This repository has been archived by the owner on Feb 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb.php
76 lines (72 loc) · 3.83 KB
/
web.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
/** @var \Laravel\Lumen\Routing\Router $router */
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/
$router->get('/', function () use ($router) {
return $router->app->version();
});
$router->group(['prefix'=>'api/v1', 'middleware' => ['cors', 'auth']], function() use($router){
// Festival
$router->get('/festival', 'FestivalController@index');
$router->post('/festival', 'FestivalController@create');
$router->get('/festival/{id}', 'FestivalController@show');
$router->put('/festival/{id}', 'FestivalController@update');
$router->delete('/festival/{id}', 'FestivalController@destroy');
// Address
$router->post('/address', 'AddressController@create');
$router->get('/address/{id}', 'AddressController@show');
$router->put('/address/{id}', 'AddressController@update');
$router->delete('/address/{id}', 'AddressController@destroy');
// Company
$router->get('/company', 'CompanyController@index');
$router->get('/company/{orgno}', 'CompanyController@show');
$router->post('/company', 'CompanyController@create');
$router->put('/company/{orgno}', 'CompanyController@update');
$router->delete('/company/{orgno}', 'CompanyController@destroy');
// Company Crew
$router->get('/company/{orgno}/crew', 'CompanyCrewController@index');
$router->post('/company/{orgno}/crew', 'CompanyCrewController@create');
$router->get('/crew/{id}', 'CompanyCrewController@show');
$router->put('/crew/{id}', 'CompanyCrewController@update');
$router->delete('/crew/{id}', 'CompanyCrewController@destroy');
// Company Note
$router->get('/company/{orgno}/notes', 'CompanyNoteController@notesByCompany');
$router->get('/crew/{crew_id}/notes', 'CompanyNoteController@notesByCrew');
$router->get('/note/{id}', 'CompanyNoteController@show');
$router->post('/company/{orgno}/crew/{crew_id}/note', 'CompanyNoteController@create');
$router->put('/note/{id}', 'CompanyNoteController@update');
$router->delete('/note/{id}', 'CompanyNoteController@destroy');
// Storage locations
$router->get('/storage', 'StorageLocationController@index');
$router->post('/storage', 'StorageLocationController@create');
$router->get('/storage/{id}', 'StorageLocationController@show');
$router->put('/storage/{id}', 'StorageLocationController@update');
$router->delete('/storage/{id}', 'StorageLocationController@destroy');
// Inventory
$router->get('/storage/{storagelocation_id}/inventory', 'InventoryController@inventoryByLocation');
$router->post('/storage/{storagelocation_id}/inventory', 'InventoryController@create');
$router->get('/inventory/{id}', 'InventoryController@show');
$router->put('/inventory/{id}', 'InventoryController@update');
$router->delete('/inventory/{id}', 'InventoryController@destroy');
// Inventory comment
$router->get('/inventory/{inventory_id}/comments', 'InventoryCommentController@commentsByInventory');
$router->post('/inventory/{inventory_id}/comment', 'InventoryCommentController@create');
$router->put('/comment/{id}', 'InventoryCommentController@update');
$router->delete('/comment/{id}', 'InventoryCommentController@destroy');
// Inventory count
$router->get('/inventory/{inventory_id}/count', 'InventoryCountController@countsByInventory');
$router->post('/inventory/{inventory_id}/count', 'InventoryCountController@create');
$router->delete('/count/{id}', 'InventoryCountController@destroy');
// Fallback
$router->options('{any:.*}', function (){
return;
});
});