classes/Controllers/Base.php
protected function findOrFail($id)
    {
        $model = $this->model;
        if ($this->withTrashed()) {
            return $model::withTrashed()->findOrFail($id);
        } else {
            return $model::findOrFail($id);
        }
    }
protected function findOrFail($id)
    {
        $model = $this->model;
        if ($this->withTrashed()) {
            return $model::withTrashed()->findOrFail($id);
        } else {
            return $model::findOrFail($id);
        }
    }
protected function findOrFail ( $ id ) { $ model = $ this -> model ; if ( $ this -> withTrashed ( ) ) { return $ model :: withTrashed ( ) -> findOrFail ( $ id ) ; } else { return $ model :: findOrFail ( $ id ) ; } }
Helper for getting a model instance by ID

@param  scalar         $id
@return Eloquent\Model
Helper for getting a model instance by ID