Is it possible to somehow give such an address to the user with the contents?

localhost / post / namePost.html

  • I don't understand the question of what it means to give back - L. Vadim
  • I have products on the site. I want the user to see the product catalog. But when switching to them, the address was opened according to the description of this topic - Mr. Music
  • but this link will work only locally, only on your computer, of course, if you do not register the local address on the client’s computer - L. Vadim

1 answer 1

This is a mockery, but it will work :)

Route::get('/{slug}{ext}',function($slug,$ext){ return [$slug,$ext]; })->where(['slug'=>'[-_A-Za-z0-9]+','ext'=>'\..+']);