Have you used previous versions of laravel, or this is your first time using bit?

|
amir_0787 2021-02-16 20:18:58
stealthSnake 2021-02-16 20:16:42
If error still persist. Stop your server and enter all of this commands. Then rerun your server

i did all

stealthSnake 2021-02-16 20:19:57
Can you screenshot the error you are in now?
amir_0787 2021-02-16 20:20:17
stealthSnake 2021-02-16 20:18:21
Do not use __ before the route’s name. If you put
->name(‘home’)

{{ route(‘home’)}}

Route [home] not defined.

amir_0787 2021-02-16 20:21:21
stealthSnake 2021-02-16 20:19:57
Can you screenshot the error you are in now?

i think ‘code with me’ plugin can help

amir_0787 2021-02-16 20:22:02
stealthSnake 2021-02-16 20:19:57
Can you screenshot the error you are in now?

laravel_discuss-70443.jpg

stealthSnake 2021-02-16 20:22:54
Also screenshot fron/menu.blade.php file
amir_0787 2021-02-16 20:23:32
amir_0787 2021-02-16 20:21:21
i think ‘code with me’ plugin can help

this plugin makes it easy for you to have a live acces to my codes

stealthSnake 2021-02-16 20:24:15
amir_0787 2021-02-16 20:23:32
this plugin makes it easy for you to have a live acces to my codes

Im not in pc right now.

amir_0787 2021-02-16 20:24:21
stealthSnake 2021-02-16 20:22:54
Also screenshot fron/menu.blade.php file

laravel_discuss-70447.jpg

amir_0787 2021-02-16 20:24:34
stealthSnake 2021-02-16 20:24:15
Im not in pc right now.

ok bro

stealthSnake 2021-02-16 20:29:12
Try this in your routes file

use AppHttpControllerIndexController;
Route::get(‘front’, [IndexController::class, ‘index’])->name(‘home’);

amir_0787 2021-02-16 20:31:12
stealthSnake 2021-02-16 20:29:12
Try this in your routes file

use AppHttpControllerIndexController;
Route::get(‘front’, [IndexController::class, ‘index’])->name(‘home’);

ok

amir_0787 2021-02-16 20:33:37
stealthSnake 2021-02-16 20:29:12
Try this in your routes file

use AppHttpControllerIndexController;
Route::get(‘front’, [IndexController::class, ‘index’])->name(‘home’);

nothing happend

amir_0787 2021-02-16 20:34:21
same error
stealthSnake 2021-02-16 20:35:55
Try
composer dump-autoload

In yourn terminal

stealthSnake 2021-02-16 20:38:29
And
php artisan route:list

So we can see the list of your routes have its route name. Screenshot it

amir_0787 2021-02-16 20:38:34
stealthSnake 2021-02-16 20:35:55
Try
composer dump-autoload

In yourn terminal

nothing

amir_0787 2021-02-16 20:39:41
stealthSnake 2021-02-16 20:38:29
And
php artisan route:list

So we can see the list of your routes have its route name. Screenshot it

IlluminateContractsContainerBindingResolutionException

amir_0787 2021-02-16 20:40:10
Target class [TermsController] does not exist.
amir_0787 2021-02-16 20:40:52
amir_0787 2021-02-16 20:40:10
Target class [TermsController] does not exist.

i have this controller but has no code inside it

amir_0787 2021-02-16 20:42:46
i wonder what to say to laravel 🙂
amir_0787 2021-02-16 20:43:39
stealthSnake 2021-02-16 20:38:29
And
php artisan route:list

So we can see the list of your routes have its route name. Screenshot it

laravel_discuss-70461.jpg

stealthSnake 2021-02-16 20:45:42
amir_0787 2021-02-16 20:43:39

Check your routes file if you used TermsController class in routes.

amir_0787 2021-02-16 20:46:47
stealthSnake 2021-02-16 20:45:42
Check your routes file if you used TermsController class in routes.

it is clean sheet and no class of Terms is used

stealthSnake 2021-02-16 20:47:02
Have you used previous versions of laravel, or this is your first time using bit?
amir_0787 2021-02-16 20:48:16
stealthSnake 2021-02-16 20:47:02
Have you used previous versions of laravel, or this is your first time using bit?

i am trying from laravel 5.8 to laravel 8

amir_0787 2021-02-16 20:50:42
but this error appeared for this project
that is why i am confused
DesolatorMagno 2021-02-16 20:53:13
The way to declare routes changes in The 8.0 version.
stealthSnake 2021-02-16 20:53:45
amir_0787 2021-02-16 20:48:16
i am trying from laravel 5.8 to laravel 8

That’s good .
Have you read the docs of Laravel 8 about routing? Its different from the previous versions where you call the controller as a string
‘IndexController@index’

. In laravel 8 you must call it as an array. Controller, method
[ IndexController::class, ‘index’]

amir_0787 2021-02-16 20:54:16
DesolatorMagno 2021-02-16 20:53:13
The way to declare routes changes in The 8.0 version.

ok

amir_0787 2021-02-16 20:54:49
stealthSnake 2021-02-16 20:53:45
That’s good .
Have you read the docs of Laravel 8 about routing? Its different from the previous versions where you call the controller as a string
‘IndexController@index’

. In laravel 8 you must call it as an array. Controller, method
[ IndexController::class, ‘index’]

let me try something new experience

stealthSnake 2021-02-16 20:56:36
Try to comment out all of your routes then paste this.

use AppHttpControllersIndexController;
Route::get(‘front/’, [ IndexController::class, ‘index’])->name(‘home’);

stealthSnake 2021-02-16 20:58:04
Then in your blade template

<a href=”{{ route(‘home’) }}” > Home</a>

amir_0787 2021-02-16 21:05:23
stealthSnake 2021-02-16 20:56:36
Try to comment out all of your routes then paste this.

use AppHttpControllersIndexController;
Route::get(‘front/’, [ IndexController::class, ‘index’])->name(‘home’);

same error with php artisan route:list

amir_0787 2021-02-16 21:05:39
Target class [TermsController] does not exist.
|