<?php namespace Bixo\Feed\Http\Requests; use Litepie\Http\Request\AbstractRequest; use Bixo\Feed\Models\Interaction; class InteractionActionsRequest 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(Interaction::class); $this->action = $this->getAction(); // Determine if the user is authorized to perform the action. return $this->can($this->action); } }