Socieboy\Forum\Requests\DeleteReplyRequest::authorize PHP Method

authorize() public method

Determine if the user is authorized to make this request.
public authorize ( ReplyRepo $replyRepo ) : boolean
$replyRepo Socieboy\Forum\Entities\Replies\ReplyRepo
return boolean
    public function authorize(ReplyRepo $replyRepo)
    {
        $reply_id = $this->route('reply_id');
        $reply = $replyRepo->findOrFail($reply_id);
        return $reply->user_id == auth()->user()->id;
    }
DeleteReplyRequest