You can set a public variable on the Request instance, something like this:
public function authorize()
{
$post = Post::where('id', $this->id)->where('user_id', Auth::id())->get()
if($post->count()>0){
$this->post = $post;
return true;
}
return false;
}
and then in controller action, for instance:
public function someAction(FormRequestChild $request)
{
var_dump($request->post);
}
Hope this helps!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community