andersao / andersao/l5-repository
BindingResolutionException
- Linguagem predominante
- PHP
- Estrelas
- 4.2k
- Forks
- 880
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
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.
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.