public function makeModel() { $model = $this->app->make($this->modelName); if (!$model instanceof Model) { throw new \Exception("Class {$this->model()} must be an instance of Illuminate\\Database\\Eloquent\\Model"); } return $this->model = $model; }