<?php namespace Bixo\Account\Http\Requests; use Litepie\Http\Request\AbstractRequest; use Bixo\Account\Models\Account; class AccountActionsRequest extends AbstractRequest { /* Model for the current request. * * @var array */ protected $action; /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { $this->model = app(Account::class); $this->action = $this->getAction(); // Determine if the user is authorized to perform the action. return $this->can($this->action); } }