snipe-it/app/Http/Requests/LicenseCheckoutRequest.php
Daniel Meltzer 248fcfa869 Move findLicenseSeatToCheckout back to controller. (#5970)
* 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.
2018-07-27 12:03:04 -07:00

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',
];
}
}