T
T
terehinis2017-01-22 00:01:22
Laravel
terehinis, 2017-01-22 00:01:22

How in laravel to send a request for which Route is not registered to the controller?

Multi-site platform on laravel 5. Any page (except those that are hardcoded in Route) is processed through the startPageGen method of the GenPageController controller. At the moment it is written with a crutch.
Route::get(parse_url($_SERVER['REQUEST_URI'])['path'], '[email protected] ');
How to solve such a problem in LARAVEL 5 humanly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrzej Wielski, 2017-01-22
@terehinis

Route::get('/{path}', '[email protected]')->where([
    'path' => '(.*)'
]);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question