index.php
688 Bytes
<?php
use App\Http\Container\UserSection\Controllers\ActivityController;
use Illuminate\Support\Facades\Route;
Route::prefix('user')->as('user.')->middleware(['api', 'auth:user'])->group(function () {
Route::prefix('auth')->group(__DIR__ . '/auth.php');
Route::apiResource('activities', ActivityController::class);
Route::put('activities/{activity}/change-status', [ActivityController::class, 'changeStatus'])->whereNumber('activity');
Route::get('activities/{activity}/views', [ActivityController::class, 'viewUser'])->whereNumber('activity');
Route::get('activities/{activity}/collects', [ActivityController::class, 'collectUser'])->whereNumber('activity');
});