3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-04 17:45:31 +00:00

Moved location routes

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2025-04-21 14:41:52 +01:00
parent e71e25955a
commit e8404c8720
3 changed files with 168 additions and 41 deletions

View File

@ -52,47 +52,6 @@ Route::group(['middleware' => 'auth'], function () {
[LabelsController::class, 'show']
)->where('labelName', '.*')->name('labels.show');
/*
* Locations
*/
Route::group(['prefix' => 'locations', 'middleware' => ['auth']], function () {
Route::post(
'bulkdelete',
[LocationsController::class, 'postBulkDelete']
)->name('locations.bulkdelete.show');
Route::post(
'bulkedit',
[LocationsController::class, 'postBulkDeleteStore']
)->name('locations.bulkdelete.store');
Route::post(
'{location}/restore',
[LocationsController::class, 'postRestore']
)->name('locations.restore');
Route::get('{locationId}/clone',
[LocationsController::class, 'getClone']
)->name('clone/location');
Route::get(
'{locationId}/printassigned',
[LocationsController::class, 'print_assigned']
)->name('locations.print_assigned');
Route::get(
'{locationId}/printallassigned',
[LocationsController::class, 'print_all_assigned']
)->name('locations.print_all_assigned');
});
Route::resource('locations', LocationsController::class, [
'parameters' => ['location' => 'location_id'],
]);
/*
* Manufacturers

56
routes/web/locations.php Normal file
View File

@ -0,0 +1,56 @@
<?php
use App\Http\Controllers\LocationsController;
use App\Http\Controllers\LocationsFilesController;
use Illuminate\Support\Facades\Route;
Route::group(['prefix' => 'locations', 'middleware' => ['auth']], function () {
Route::post('{location}/upload',
[LocationsFilesController::class, 'store']
)->name('upload/locations')->withTrashed();
Route::get('{location}/showfile/{fileId}/{download?}',
[LocationsFilesController::class, 'show']
)->name('show/locationsfile')->withTrashed();
Route::delete('{location}/showfile/{fileId}/delete',
[LocationsFilesController::class, 'destroy']
)->name('delete/locationsfile')->withTrashed();
Route::post(
'bulkdelete',
[LocationsController::class, 'postBulkDelete']
)->name('locations.bulkdelete.show');
Route::post(
'bulkedit',
[LocationsController::class, 'postBulkDeleteStore']
)->name('locations.bulkdelete.store');
Route::post(
'{location}/restore',
[LocationsController::class, 'postRestore']
)->name('locations.restore');
Route::get('{locationId}/clone',
[LocationsController::class, 'getClone']
)->name('clone/location');
Route::get(
'{locationId}/printassigned',
[LocationsController::class, 'print_assigned']
)->name('locations.print_assigned');
Route::get(
'{locationId}/printallassigned',
[LocationsController::class, 'print_all_assigned']
)->name('locations.print_all_assigned');
});
Route::resource('locations', LocationsController::class, [
'middleware' => ['auth'],
])->withTrashed();