mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-13 17:14:10 -08:00
248fcfa869
* Move findLicenseSeatToCheckout back to controller. After discussion, move findLicenseSeatToCheckout method back to controller from form request. Also cleanup one tiny bit more with null coalesce operator (Yay php 7). * Revert Earlier change. $target only exists in the checkoutTo* methods. Need to log the checkout individually in each of those.
33 lines
610 B
PHP
33 lines
610 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use App\Models\LicenseSeat;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class LicenseCheckoutRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function authorize()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
'note' => 'string|nullable',
|
|
'asset_id' => 'required_without:assigned_to',
|
|
];
|
|
}
|
|
}
|