mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 06:20:21 +00:00
api & web routes
This commit is contained in:
1 parent
3de0b4193b
commit
30ae7dab84
2 files changed
+16
-1
No files matched your search
@@ -1,8 +1,11 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Resources\ProjectCollection;
|
||||
use App\Http\Resources\TeamCollection;
|
||||
use App\Http\Resources\TeamResource;
|
||||
use App\Http\Resources\UserCollection;
|
||||
use App\Http\Resources\UserResource;
|
||||
use App\Models\Project;
|
||||
use App\Models\Team;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
@@ -33,3 +36,14 @@ Route::get('/v1/teams/{id}', function ($id) {
|
||||
Route::get('/v1/employees', function () {
|
||||
return new UserCollection(User::all());
|
||||
});
|
||||
|
||||
|
||||
Route::get('/v1/employees/{id}', function ($id) {
|
||||
return new UserResource(User::find($id));
|
||||
});
|
||||
|
||||
Route::get('/public/v1/projects', function () {
|
||||
return new ProjectCollection(Project::all());
|
||||
});
|
||||
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use App\Http\Resources\TeamCollection;
|
||||
use App\Models\Team;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user