mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
employees endpoint
This commit is contained in:
1 parent
876a67604d
commit
8b64d31962
4 files changed
+15
-2
No files matched your search
@@ -1,7 +1,10 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Resources\TeamCollection;
|
||||
use App\Http\Resources\TeamResource;
|
||||
use App\Http\Resources\UserCollection;
|
||||
use App\Models\Team;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
/*
|
||||
@@ -22,3 +25,11 @@ use Illuminate\Support\Facades\Route;
|
||||
Route::get('/v1/teams', function () {
|
||||
return new TeamCollection(Team::all());
|
||||
});
|
||||
|
||||
Route::get('/v1/teams/{id}', function ($id) {
|
||||
return new TeamResource(Team::find($id));
|
||||
});
|
||||
|
||||
Route::get('/v1/employees', function () {
|
||||
return new UserCollection(User::all());
|
||||
});
|
||||
Reference in new issue
Block a user