2021-04-07 18:08:26 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Requests\ClientPortal\Subscriptions;
|
|
|
|
|
|
|
|
use App\Models\Subscription;
|
|
|
|
use App\Utils\Traits\MakesHash;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
|
|
|
|
class ShowPlanSwitchRequest extends FormRequest
|
|
|
|
{
|
|
|
|
use MakesHash;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function authorize()
|
|
|
|
{
|
2021-11-28 11:19:34 +01:00
|
|
|
|
2021-04-12 13:56:08 +02:00
|
|
|
return (bool)$this->recurring_invoice->subscription->allow_plan_changes;
|
2021-04-07 18:08:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the validation rules that apply to the request.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function rules()
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
//
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|