36 lines
1.2 KiB
PHP
36 lines
1.2 KiB
PHP
<?php
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Route;
|
|
use App\Http\Controllers\MobileApiController;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 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::prefix('mobile')->group(function () {
|
|
Route::get('ping', [MobileApiController::class, 'ping']);
|
|
Route::post('login', [MobileApiController::class, 'login']);
|
|
Route::get('dashboard', [MobileApiController::class, 'dashboard']);
|
|
Route::get('early-warning', [MobileApiController::class, 'earlyWarning']);
|
|
Route::get('books/{master}/examinations', [MobileApiController::class, 'examinations']);
|
|
Route::get('examinations/{id}', [MobileApiController::class, 'examination']);
|
|
});
|
|
|
|
Route::group([
|
|
'middleware' => 'auth:api'
|
|
], function () {
|
|
|
|
});
|