generated from liutk/owl-admin-base
32 lines
1.1 KiB
PHP
32 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Api;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| API Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here is where you can register API routes for your application. These
|
|
| routes are loaded by the RouteServiceProvider and all of them will
|
|
| be assigned to the "api" middleware group. Make something great!
|
|
|
|
|
*/
|
|
|
|
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
|
|
return $request->user();
|
|
});
|
|
|
|
Route::middleware('api')->group(function () {
|
|
Route::post('captchas', [CaptchaController::class, 'store']);
|
|
Route::get('captchas/{captcha}', [CaptchaController::class, 'show']);
|
|
|
|
Route::get('/ads', [AdController::class, 'index']);
|
|
Route::get('/project_cates', [ProjectController::class, 'index']);
|
|
Route::get('/project_childrens', [ProjectChildrenController::class, 'index']);
|
|
Route::get('/project_childrens/{children}', [ProjectChildrenController::class, 'show']);
|
|
|
|
}); |