first commit

This commit is contained in:
2026-02-04 23:23:42 +07:00
commit ee28ea1a2d
202 changed files with 34797 additions and 0 deletions

12
laravel/routes/api.php Normal file
View File

@@ -0,0 +1,12 @@
<?php
use App\Http\Controllers\ArticleController;
use App\Http\Controllers\CommentController;
use Illuminate\Support\Facades\Route;
Route::prefix('articles')->group(function () {
Route::get('/', [ArticleController::class, 'index'])->name('articles.index');
Route::get('/{article}', [ArticleController::class, 'show'])->name('articles.show');
Route::post('/', [ArticleController::class, 'store'])->name('articles.store');
Route::post('/{article}/comments', [CommentController::class, 'store'])->name('comments.store');
});

View File

@@ -0,0 +1,8 @@
<?php
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
Artisan::command('inspire', function () {
$this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote');

View File

@@ -0,0 +1,31 @@
<?php
use App\Http\Controllers\Settings\PasswordController;
use App\Http\Controllers\Settings\ProfileController;
use App\Http\Controllers\Settings\TwoFactorAuthenticationController;
use Illuminate\Support\Facades\Route;
use Inertia\Inertia;
Route::middleware(['auth'])->group(function () {
Route::redirect('settings', '/settings/profile');
Route::get('settings/profile', [ProfileController::class, 'edit'])->name('profile.edit');
Route::patch('settings/profile', [ProfileController::class, 'update'])->name('profile.update');
});
Route::middleware(['auth', 'verified'])->group(function () {
Route::delete('settings/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
Route::get('settings/password', [PasswordController::class, 'edit'])->name('user-password.edit');
Route::put('settings/password', [PasswordController::class, 'update'])
->middleware('throttle:6,1')
->name('user-password.update');
Route::get('settings/appearance', function () {
return Inertia::render('settings/appearance');
})->name('appearance.edit');
Route::get('settings/two-factor', [TwoFactorAuthenticationController::class, 'show'])
->name('two-factor.show');
});

20
laravel/routes/web.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
use Illuminate\Support\Facades\Route;
use Inertia\Inertia;
Route::get('/', function () {
return Inertia::render('welcome');
})->name('home');
Route::get('/articles/{id}', function ($id) {
return Inertia::render('Articles/Show', [
'articleId' => (int)$id,
]);
});
Route::get('dashboard', function () {
return Inertia::render('dashboard');
})->middleware(['auth', 'verified'])->name('dashboard');
require __DIR__ . '/settings.php';