Departments routes

This commit is contained in:
snipe 2017-05-22 21:31:47 -07:00
parent 0c43e64160
commit e3a5accace
2 changed files with 74 additions and 48 deletions

View file

@ -79,6 +79,24 @@ Route::group(['prefix' => 'v1','namespace' => 'Api'], function () {
); // Companies resource
/*--- Departments API ---*/
Route::resource('departments', 'DepartmentsController',
[
'names' =>
[
'index' => 'api.departments.index',
'show' => 'api.departments.show',
'store' => 'api.departments.store',
'update' => 'api.departments.update',
'destroy' => 'api.departments.destroy'
],
'except' => ['create', 'edit'],
'parameters' => ['department' => 'department_id']
]
); // Departments resource
/*--- Components API ---*/
Route::resource('components', 'ComponentsController',

View file

@ -2,62 +2,70 @@
Route::group(['middleware' => 'auth'], function () {
/*
* Companies
*/
Route::resource('companies', 'CompaniesController', [
'parameters' => ['company' => 'company_id']
]);
/*
* Companies
*/
Route::resource('companies', 'CompaniesController', [
'parameters' => ['company' => 'company_id']
]);
/*
* Categories
*/
Route::resource('categories', 'CategoriesController', [
'parameters' => ['category' => 'category_id']
]);
/*
* Categories
*/
Route::resource('categories', 'CategoriesController', [
'parameters' => ['category' => 'category_id']
]);
/*
* Locations
*/
Route::resource('locations', 'LocationsController', [
'parameters' => ['location' => 'location_id']
]);
/*
* Locations
*/
Route::resource('locations', 'LocationsController', [
'parameters' => ['location' => 'location_id']
]);
/*
* Manufacturers
*/
Route::resource('manufacturers', 'ManufacturersController', [
'parameters' => ['manufacturer' => 'manufacturers_id']
]);
/*
* Manufacturers
*/
Route::resource('manufacturers', 'ManufacturersController', [
'parameters' => ['manufacturer' => 'manufacturers_id']
]);
/*
* Suppliers
*/
Route::resource('suppliers', 'SuppliersController', [
'parameters' => ['supplier' => 'supplier_id']
]);
/*
* Suppliers
*/
Route::resource('suppliers', 'SuppliersController', [
'parameters' => ['supplier' => 'supplier_id']
]);
/*
* Depreciations
*/
Route::resource('depreciations', 'DepreciationsController', [
'parameters' => ['depreciation' => 'depreciation_id']
]);
/*
* Depreciations
*/
Route::resource('depreciations', 'DepreciationsController', [
'parameters' => ['depreciation' => 'depreciation_id']
]);
/*
* Status Labels
*/
Route::resource('statuslabels', 'StatuslabelsController', [
'parameters' => ['statuslabel' => 'statuslabel_id']
]);
/*
* Status Labels
*/
Route::resource('statuslabels', 'StatuslabelsController', [
'parameters' => ['statuslabel' => 'statuslabel_id']
]);
/*
* Status Labels
*/
Route::resource('components', 'ComponentsController', [
'parameters' => ['component' => 'component_id']
]);
/*
* Status Labels
*/
Route::resource('components', 'ComponentsController', [
'parameters' => ['component' => 'component_id']
]);
/*
* Departments
*/
Route::resource('departments', 'DepartmentsController', [
'parameters' => ['department' => 'department_id']
]);
});