Initial commit

This commit is contained in:
2023-11-20 22:47:58 +01:00
commit 905d01ad40
98 changed files with 13862 additions and 0 deletions

20
routes/api.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
use App\Http\Resources\UserResource;
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 within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::middleware(['auth:sanctum'])->get('/user', function (Request $request) {
return new UserResource($request->user()->load('roles'));
});