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 2
2
3
3
namespace $NAMESPACE_APP$\Repositories;
4
4
5
- use Illuminate\Container\Container as Application;
6
5
use Illuminate\Database\Eloquent\Model;
7
6
8
7
@@ -13,19 +12,12 @@ abstract class BaseRepository
13
12
*/
14
13
protected $model;
15
14
16
- /**
17
- * @var Application
18
- */
19
- protected $app;
20
15
21
16
/**
22
- * @param Application $app
23
- *
24
17
* @throws \Exception
25
18
*/
26
- public function __construct(Application $app )
19
+ public function __construct()
27
20
{
28
- $this->app = $app;
29
21
$this->makeModel();
30
22
}
31
23
@@ -52,7 +44,7 @@ abstract class BaseRepository
52
44
*/
53
45
public function makeModel()
54
46
{
55
- $model = $this-> app->make ($this->model());
47
+ $model = app($this->model());
56
48
57
49
if (!$model instanceof Model) {
58
50
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