andersao / andersao/l5-repository

Class not found exception

Offen
#392 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
PHP
Sterne
4.2k
Forks
880
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I have created a repository using commands and everything worked fine. It has been a while that I have not created one. but some work is done without effort that was not done before like registering repositories. which seems not working. and after calling methods from controller I get the following error:

ReflectionException in Container.php line 734:
Class App\Repositories\Tour does not exist

and this is the stack trace:

`in Container.php line 734
at ReflectionClass->__construct('App\Repositories\Tour') in Container.php line 734
at Container->build('App\Repositories\Tour', array()) in Container.php line 629
at Container->make('App\Repositories\Tour', array()) in Application.php line 697
at Application->make('App\Repositories\Tour') in BaseRepository.php line 176
at BaseRepository->makeModel() in BaseRepository.php line 92
at BaseRepository->__construct(object(Application))
at ReflectionClass->newInstanceArgs(array(object(Application))) in Container.php line 779
at Container->build('App\Repositories\TourRepositoryEloquent', array()) in Container.php line 629
at Container->make('App\Repositories\TourRepositoryEloquent', array()) in Application.php line 697
at Application->make('App\Repositories\TourRepositoryEloquent', array()) in Container.php line 230
at Container->Illuminate\Container\{closure}(object(Application), array()) in Container.php line 731
at Container->build(object(Closure), array()) in Container.php line 629
at Container->make('App\Repositories\TourRepository', array()) in Application.php line 697
at Application->make('App\Repositories\TourRepository') in Container.php line 849
at Container->resolveClass(object(ReflectionParameter)) in Container.php line 804
at Container->getDependencies(array(object(ReflectionParameter), object(ReflectionParameter), object(ReflectionParameter), object(ReflectionParameter), object(ReflectionParameter), object(ReflectionParameter), object(ReflectionParameter), object(ReflectionParameter)), array()) in Container.php line 775
at Container->build('App\Http\Controllers\HomeController', array()) in Container.php line 629
at Container->make('App\Http\Controllers\HomeController', array()) in Application.php line 697
at Application->make('App\Http\Controllers\HomeController') in ControllerDispatcher.php line 67
at ControllerDispatcher->makeController('App\Http\Controllers\HomeController') in ControllerDispatcher.php line 52
at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\HomeController', 'welcome') in Route.php line 174
at Route->runController(object(Request)) in Route.php line 140
at Route->run(object(Request)) in Router.php line 724
at Router->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52`

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.