2021-03-08 15:19:45 +01:00
|
|
|
<?php
|
2021-03-10 01:08:58 +01:00
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @license https://opensource.org/licenses/AAL
|
|
|
|
*/
|
2021-03-08 15:19:45 +01:00
|
|
|
|
2021-03-25 11:55:59 +01:00
|
|
|
namespace App\Http\Requests\Subscription;
|
2021-03-08 15:19:45 +01:00
|
|
|
|
|
|
|
use App\Http\Requests\Request;
|
|
|
|
use App\Utils\Traits\ChecksEntityStatus;
|
|
|
|
|
2021-03-25 11:55:59 +01:00
|
|
|
class UpdateSubscriptionRequest extends Request
|
2021-03-08 15:19:45 +01:00
|
|
|
{
|
|
|
|
use ChecksEntityStatus;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function authorize()
|
|
|
|
{
|
2021-03-25 11:55:59 +01:00
|
|
|
return auth()->user()->can('edit', $this->subscription);
|
2021-03-08 15:19:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the validation rules that apply to the request.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function rules()
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
//
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|