mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
License checkout controller with route model binding
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
4beaf6b3ec
commit
22c58678c4
|
@ -28,11 +28,8 @@ class LicenseCheckoutController extends Controller
|
|||
* @return \Illuminate\Contracts\View\View
|
||||
* @throws \Illuminate\Auth\Access\AuthorizationException
|
||||
*/
|
||||
public function create($id)
|
||||
public function create(License $license)
|
||||
{
|
||||
|
||||
if ($license = License::find($id)) {
|
||||
|
||||
$this->authorize('checkout', $license);
|
||||
|
||||
if ($license->category) {
|
||||
|
@ -52,12 +49,6 @@ class LicenseCheckoutController extends Controller
|
|||
|
||||
}
|
||||
|
||||
// Not found
|
||||
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.not_found'));
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates and stores the license checkout action.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue