N
N
Nikita Zelikov2021-08-20 20:08:45
Laravel
Nikita Zelikov, 2021-08-20 20:08:45

Laravel, setting up a route?

He does not see the page through the routes, although everything is good, if you set a template route, he sees it, but the rest of the routes do not!
What could be the problem ... (error 404)

Everything works fine on the local host, transfer to Apache (I'm doing the first time uploading a finished project ...)

Route::get('/', Site\IndexController::class)->name('site.index');

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Kudrya, 2021-08-21
@Mugenzo

1) you need a full namespace 2) judging by how the class is written, the
__invoke function should be called in it. I also advise you to debug
the route through php artisan route:list

J
jazzus, 2021-08-20
@jazzus

https://laravel.com/docs/8.x/controllers#basic-con...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question