jeudi 10 février 2022

How do I get a separator with a variable inside the URL in Laravel 5.8

I'm using Laravel 5.8 to develop a project. I have a page which contains a button, clicking on it will redirect you to a registration page. This button is located in multiple pages, so, when the button is clicked, I want the name of the page from which it was clicked to be shown in the URL.

For Example, take this Youtube link, https://www.youtube.com/watch?v=dQw4w9WgXcQ

The /watch?v=dQ part, I want to have that in my URL, where "watch" would be the current page's name, and v would contain the name/id of the previous page. I have posted the button and the routes below.

Let me know if something else is required.

<a href="" class="set-btn btn3">Request a Demo</a>

Route::get('demo','Controller@dropdown_data');

Route::POST('demo','Controller@submit');

The get route calls a function to retrieve data for dropdown fields from a database. The post route calls the function for submission of the details.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3594qRo
via IFTTT

Aucun commentaire:

Enregistrer un commentaire