src/Post/PostRepository.php
public function findOrFail($id, User $actor = null)
    {
        return $this->queryVisibleTo($actor)->findOrFail($id);
    }
public function findOrFail($id, User $actor = null)
    {
        return $this->queryVisibleTo($actor)->findOrFail($id);
    }
public function findOrFail ( $ id , User $ actor = null ) { return $ this -> queryVisibleTo ( $ actor ) -> findOrFail ( $ id ) ; }
Find a post by ID, optionally making sure it is visible to a certain
user, or throw an exception.

@param int $id
@param \Flarum\User\User $actor
@return \Flarum\Post\Post

@throws \Illuminate\Database\Eloquent\ModelNotFoundException
Find a post by ID optionally making sure it is visible to a certain user or throw an exception .