public function getOrFail($id)
    {
        if ($model = $this->get($id)) {
            return $model;
        }

        throw (new NotFoundException("No results for id $id"))->setModel(get_class($this->model));
    }
public function getOrFail($id)
    {
        if ($model = $this->get($id)) {
            return $model;
        }

        throw (new NotFoundException("No results for id $id"))->setModel(get_class($this->model));
    }
public function getOrFail ( $ id ) { if ( $ model = $ this -> get ( $ id ) ) { return $ model ; } throw ( new NotFoundException ( "No results for id $id" ) ) -> setModel ( get_class ( $ this -> model ) ) ; }
Find a model by its id. Throw a NotFoundException if not found.

@param mixed $id

@throws \Ems\Contracts\Core\Errors\NotFound If no model was found by the id

@return \Ems\Contracts\Core\Identifiable
Find a model by its id . Throw a NotFoundException if not found .