Files
jandl-taskmanager-app/be/routes/api.php
T
2023-01-17 10:28:42 +01:00

25 lines
694 B
PHP

<?php
use App\Http\Resources\TeamCollection;
use App\Models\Team;
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 $request->user();
//});
Route::get('/v1/teams', function () {
return new TeamCollection(Team::all());
});