public function findOrFail($id)
    {
        if ($model = $this->find($id)) {
            return $model;
        }
        throw (new ModelNotFoundException)->setModel(get_class($this->getModel()));
    }
public function findOrFail($id)
    {
        if ($model = $this->find($id)) {
            return $model;
        }
        throw (new ModelNotFoundException)->setModel(get_class($this->getModel()));
    }
public function findOrFail ( $ id ) { if ( $ model = $ this -> find ( $ id ) ) { return $ model ; } throw ( new ModelNotFoundException ) -> setModel ( get_class ( $ this -> getModel ( ) ) ) ; }
Find and throw an exception if model not found

@return mixed The resource
Find and throw an exception if model not found