I created CustomerController in Http, later, I fixed-route get customers, but getting an error in a single action Controller.
I tried to show off CustomerController view for displaying customers logged in page
Here is my error message:
Use of undefined constant view – assumed ‘view’ (this will throw an Error in a future version of PHP)
2
Answers
The first argument of the view method in the controller should be the name of the view.
Looks like you’re trying to access the old ways to render blade file look at this :-
To use view() method
Take a look a this for Single Action Controllers example
https://laravel.com/docs/5.8/controllers#single-action-controllers