John Davidson

php - Unable to get query parameters from laravel url get request

0 comments
Message:


this is my url and i am unable to get the query parameters i dont know why.
anyone can tell me whats going on?


http://localhost:8000/senders/verify#/[email protected]&option=AccountActivated

if I use


http://localhost:8000/senders/[email protected]&option=AccountActivated

I can successfully get the varaibles but after putting #/activate i can't. i dont know why.



My Answer:
It looks like the URL you provided does not have any query parameters. Query parameters are typically added to a URL after a question mark (?) followed by key-value pairs separated by an ampersand (&).

For example, a URL with query parameters would look like this:
http://localhost:8000/senders/verify?param1=value1¶m2=value2

If you are trying to access query parameters in a Laravel controller, you can use the `request()` helper function to retrieve them. For example:

php
$value1 = request('param1');
$value2 = request('param2');


Make sure to include the necessary query parameters in your URL for them to be accessible in your Laravel application.

Rate this post

3 of 5 based on 6252 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us