2016-12-15 04:12:18 -08:00
|
|
|
<?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 04:12:18 -08:00
|
|
|
|
2016-12-15 11:57:19 -08:00
|
|
|
Route::get('{licenseId}/freecheckout', [
|
|
|
|
'as' => 'freecheckout/license',
|
|
|
|
'middleware' => 'authorize:licenses.checkout',
|
|
|
|
'uses' => 'LicensesController@getFreeLicense'
|
|
|
|
]);
|
|
|
|
Route::get(
|
|
|
|
'{licenseId}/checkout',
|
|
|
|
[ 'as' => 'checkout/license', 'middleware' => 'authorize:licenses.checkout','uses' => 'LicensesController@getCheckout' ]
|
|
|
|
);
|
|
|
|
Route::post(
|
|
|
|
'{licenseId}/checkout',
|
|
|
|
[ 'as' => 'checkout/license', 'middleware' => 'authorize:licenses.checkout','uses' => 'LicensesController@postCheckout' ]
|
|
|
|
);
|
|
|
|
Route::get('{licenseId}/checkin/{backto?}', [
|
|
|
|
'as' => 'checkin/license',
|
|
|
|
'middleware' => 'authorize:licenses.checkin',
|
|
|
|
'uses' => 'LicensesController@getCheckin'
|
|
|
|
]);
|
2016-12-15 04:12:18 -08:00
|
|
|
|
2016-12-15 11:57:19 -08:00
|
|
|
Route::post('{licenseId}/checkin/{backto?}', [
|
|
|
|
'as' => 'checkin/license',
|
|
|
|
'middleware' => 'authorize:licenses.checkin',
|
|
|
|
'uses' => 'LicensesController@postCheckin'
|
|
|
|
]);
|
|
|
|
|
|
|
|
#legacy
|
|
|
|
Route::get('{licenseId}/view', [
|
|
|
|
'as' => 'view/license',
|
|
|
|
'middleware' => 'authorize:licenses.view',
|
|
|
|
'uses' => 'LicensesController@getView'
|
|
|
|
]);
|
2016-12-15 04:12:18 -08:00
|
|
|
|
2016-12-15 11:57:19 -08:00
|
|
|
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' ]
|
|
|
|
);
|
2016-12-15 04:12:18 -08:00
|
|
|
});
|
|
|
|
|
|
|
|
Route::resource('licenses', 'LicensesController', [
|
2016-12-15 11:57:19 -08:00
|
|
|
'parameters' => ['license' => 'license_id']
|
2016-12-15 04:12:18 -08:00
|
|
|
]);
|