andersao / andersao/l5-repository
BindingResolutionException
- 主要言語
- PHP
- スター
- 4.2k
- フォーク
- 880
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I have installed and configured everything.
When i am trying to create Route with Controller / any Class method, i have got this error
`Illuminate \ Contracts \ Container \ BindingResolutionException
Target [App\Repositories\SubscriptionRepository] is not instantiable while building [App\Http\Controllers\SubscriptionsController].
...
throw new BindingResolutionException($message);
...`
**Routes**
`
```
// this works
Route::get('/test', function(){
return view('test_view');
});
// and this one is NOT
Route::get('test', 'TestsController@test'); // here we return our test_view
```
1 - this causes memory leak -> App\Providers\AppRepositoryProvider in app.php
2 - composer update
3 - composer dumautoload
4 - php artisan clear-compiled
5 - php artisan chache:clear
6 - checked binding, i am not pro, but it seems to be ok
`$this->app->bind(\App\Repositories\TestRepository::class, \App\Repositories\TestRepositoryEloquent::class);`
Also, in Laravel 5.4 was changed Trait name.
コントリビューションガイド
評価
この issue はまだ評価されていません。