File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change 22
33namespace $NAMESPACE_APP$\Repositories;
44
5- use Illuminate\Container\Container as Application;
65use Illuminate\Database\Eloquent\Model;
76
87
@@ -13,19 +12,12 @@ abstract class BaseRepository
1312 */
1413 protected $model;
1514
16- /**
17- * @var Application
18- */
19- protected $app;
2015
2116 /**
22- * @param Application $app
23- *
2417 * @throws \Exception
2518 */
26- public function __construct(Application $app )
19+ public function __construct()
2720 {
28- $this->app = $app;
2921 $this->makeModel();
3022 }
3123
@@ -52,7 +44,7 @@ abstract class BaseRepository
5244 */
5345 public function makeModel()
5446 {
55- $model = $this-> app->make ($this->model());
47+ $model = app($this->model());
5648
5749 if (!$model instanceof Model) {
5850 throw new \Exception("Class {$this->model()} must be an instance of Illuminate\\Database\\Eloquent\\Model");
You can’t perform that action at this time.
0 commit comments