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)
|
|
|
|
*
|
2021-06-16 08:58:16 +02:00
|
|
|
* @license https://www.elastic.co/licensing/elastic-license
|
2021-03-10 01:08:58 +01:00
|
|
|
*/
|
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 Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
2021-03-25 11:55:59 +01:00
|
|
|
class ShowSubscriptionRequest extends Request
|
2021-03-08 15:19:45 +01:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function authorize() : bool
|
|
|
|
{
|
2021-03-25 11:55:59 +01:00
|
|
|
return auth()->user()->can('view', $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 [
|
|
|
|
//
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|