snipe-it/routes/web/licenses.php

52 lines
1.9 KiB
PHP
Raw Normal View History

<?php
# Licenses
Route::group([ 'prefix' => 'licenses', 'middleware'=>'authorize:licenses.view' ], function () {
2016-12-15 11:57:19 -08:00
Route::get('{licenseId}/clone', [ 'as' => 'clone/license', 'middleware' => 'authorize:licenses.create', 'uses' => 'LicensesController@getClone' ]);
Route::post('{licenseId}/clone', [ 'as' => 'clone/license', 'middleware' => 'authorize:licenses.create', 'uses' => 'LicensesController@postCreate' ]);
2016-12-15 11:57:19 -08:00
Route::get('{licenseId}/freecheckout', [
2016-12-15 13:07:34 -08:00
'as' => 'licenses.freecheckout',
2016-12-15 11:57:19 -08:00
'middleware' => 'authorize:licenses.checkout',
'uses' => 'LicensesController@getFreeLicense'
]);
Route::get(
'{licenseId}/checkout',
2016-12-15 13:07:34 -08:00
[ 'as' => 'licenses.checkout', 'middleware' => 'authorize:licenses.checkout','uses' => 'LicensesController@getCheckout' ]
2016-12-15 11:57:19 -08:00
);
Route::post(
'{licenseId}/checkout',
2016-12-15 13:07:34 -08:00
[ 'as' => 'licenses.checkout', 'middleware' => 'authorize:licenses.checkout','uses' => 'LicensesController@postCheckout' ]
2016-12-15 11:57:19 -08:00
);
Route::get('{licenseId}/checkin/{backto?}', [
2016-12-15 13:07:34 -08:00
'as' => 'licenses.checkin',
2016-12-15 11:57:19 -08:00
'middleware' => 'authorize:licenses.checkin',
'uses' => 'LicensesController@getCheckin'
]);
2016-12-15 11:57:19 -08:00
Route::post('{licenseId}/checkin/{backto?}', [
2016-12-15 13:07:34 -08:00
'as' => 'licenses.checkin',
2016-12-15 11:57:19 -08:00
'middleware' => 'authorize:licenses.checkin',
'uses' => 'LicensesController@postCheckin'
]);
Route::post(
'{licenseId}/upload',
[ 'as' => 'upload/license', 'middleware' => 'authorize:licenses.edit','uses' => 'LicensesController@postUpload' ]
);
Route::get(
'{licenseId}/deletefile/{fileId}',
[ 'as' => 'delete/licensefile', 'middleware' => 'authorize:licenses.edit', 'uses' => 'LicensesController@getDeleteFile' ]
);
Route::get(
'{licenseId}/showfile/{fileId}',
[ 'as' => 'show/licensefile', 'middleware' => 'authorize:licenses.view','uses' => 'LicensesController@displayFile' ]
);
});
Route::resource('licenses', 'LicensesController', [
2016-12-15 11:57:19 -08:00
'parameters' => ['license' => 'license_id']
]);