skip to Main Content

Controller does not exist in laravel 5.6

I have this error where it said that the controller does not exist My routes use AppHttpControllersPasienController; Route::resource('/pasien', PasienController::class)->only(['index']); The controller <?php namespace AppHttpControllers; use AppToken; use IlluminateHttpRequest; use IlluminateSupportFacadesHttp; use IlluminateSupportFacadesSession; use IlluminateSupportFacadesValidator; use RealRashidSweetAlertFacadesAlert; class PasienController extends Controller…

VIEW QUESTION

Undefined method getDoctrine – PHP

I am a beginner on Symfony 6 and I am blocked because I have an error message: "Undefined method getDoctrine" with Intelephense Here is my code: #[Route('/recettes', name: 'app_recettes')] public function index(int $id): Response { $em = $this->getDoctrine()->getManager(); $recette =…

VIEW QUESTION

Error with mapping out routes to controller classes in Laravel

I am having an issue when trying to define my routes to controller classes in Laravel. My web.php route looks like this: use AppHttpControllersFrontendArticlesController as FrontEndArticlesController; Route::get('/articles/{article:slug}', [FrontendArticlesController::class, 'show']); The controller looks like this: namespace AppHttpControllers; use AppModelsArticle; use IlluminateHttpRequest;…

VIEW QUESTION
Back To Top
Search