2016-12-15 04:12:18 -08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
# Licenses
|
2017-03-11 05:16:56 -08:00
|
|
|
Route::group([ 'prefix' => 'licenses', 'middleware' => ['auth'] ], function () {
|
2016-12-15 04:12:18 -08:00
|
|
|
|
2016-12-19 11:04:28 -08:00
|
|
|
Route::get('{licenseId}/clone', [ 'as' => 'clone/license', 'uses' => 'LicensesController@getClone' ]);
|
|
|
|
Route::post('{licenseId}/clone', [ 'as' => 'clone/license', 'uses' => 'LicensesController@postCreate' ]);
|
2016-12-15 04:12:18 -08:00
|
|
|
|
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
|
|
|
'uses' => 'LicensesController@getFreeLicense'
|
|
|
|
]);
|
2016-12-19 11:04:28 -08:00
|
|
|
Route::get('{licenseId}/checkout', [
|
|
|
|
'as' => 'licenses.checkout',
|
|
|
|
'uses' => 'LicensesController@getCheckout'
|
|
|
|
]);
|
2016-12-15 11:57:19 -08:00
|
|
|
Route::post(
|
2016-12-19 11:04:28 -08:00
|
|
|
'{licenseId}/checkout',
|
|
|
|
[ 'as' => '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
|
|
|
'uses' => 'LicensesController@getCheckin'
|
|
|
|
]);
|
2016-12-15 04:12:18 -08:00
|
|
|
|
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
|
|
|
'uses' => 'LicensesController@postCheckin'
|
|
|
|
]);
|
|
|
|
|
|
|
|
Route::post(
|
|
|
|
'{licenseId}/upload',
|
2016-12-19 11:04:28 -08:00
|
|
|
[ 'as' => 'upload/license', 'uses' => 'LicensesController@postUpload' ]
|
2016-12-15 11:57:19 -08:00
|
|
|
);
|
|
|
|
Route::get(
|
|
|
|
'{licenseId}/deletefile/{fileId}',
|
2016-12-19 11:04:28 -08:00
|
|
|
[ 'as' => 'delete/licensefile', 'uses' => 'LicensesController@getDeleteFile' ]
|
2016-12-15 11:57:19 -08:00
|
|
|
);
|
|
|
|
Route::get(
|
|
|
|
'{licenseId}/showfile/{fileId}',
|
2016-12-19 11:04:28 -08:00
|
|
|
[ 'as' => 'show/licensefile', 'uses' => 'LicensesController@displayFile' ]
|
2016-12-15 11:57:19 -08:00
|
|
|
);
|
2016-12-15 04:12:18 -08:00
|
|
|
});
|
|
|
|
|
|
|
|
Route::resource('licenses', 'LicensesController', [
|
2017-03-11 05:16:56 -08:00
|
|
|
'middleware' => ['auth'],
|
2016-12-15 11:57:19 -08:00
|
|
|
'parameters' => ['license' => 'license_id']
|
2016-12-15 04:12:18 -08:00
|
|
|
]);
|