taktik - laravel

This commit is contained in:
2025-01-23 00:19:07 +01:00
commit 43b6cff880
127 changed files with 15025 additions and 0 deletions

25
routes/api.php Normal file
View File

@@ -0,0 +1,25 @@
<?php
use App\Http\Controllers\CategoryController;
use App\Http\Controllers\CommentController;
use App\Http\Controllers\PostController;
use Illuminate\Support\Facades\Route;
Route::get('v1/posts/{page}', [PostController::class, 'list']);
Route::post('v1/posts', [PostController::class, 'store']);
Route::get('v1/post/{id}', [PostController::class, 'show']);
Route::put('v1/post/{id}', [PostController::class, 'update']);
Route::delete('v1/post/{id}', [PostController::class, 'destroy']);
// comments
Route::get('v1/post/{post_id}/comments/{page}', [CommentController::class, 'list']);
Route::post('v1/post/{post_id}/comments', [CommentController::class, 'store']);
Route::delete('v1/post/{post_id}/comment/{id}', [CommentController::class, 'destroy']);
Route::put('v1/post/{post_id}/comment/{id}', [CommentController::class, 'update']);
// categories
Route::post('v1/categories', [CategoryController::class, 'store']);
Route::get('v1/categories/{page}', [CategoryController::class, 'list']);
Route::get('v1/category/{id}', [CategoryController::class, 'show']);
Route::put('v1/category/{id}', [CategoryController::class, 'update']);
Route::delete('v1/category/{id}', [CategoryController::class, 'destroy']);

8
routes/console.php Normal file
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')->hourly();

7
routes/web.php Normal file
View File

@@ -0,0 +1,7 @@
<?php
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
return redirect('/api/documentation');
});