What I need: My app has a public domain All routes in my Admin controller should be opened only if the remote domain is domain1.com and also in local environment. Currently: if I put the admin panel route in the group, it is not visible in local environment any more, making it difficult to develop. Solutions My current solution: in
Tag: routes
Getting http://127.0.0.1:8000/route(‘welcome’) instead of http://127.0.0.1:8000/ in laravel 9
I’ve come across a peculiar bug in a laravel project of mine, In my web.php I have a named route ‘welcome’ : This route contain my index page in which there’s a navigation component. Through an AppServiceProvider I’m passing data to the navigation component The data im passing is a simple table containing this : { name : “home”, href
Best way to obtain prefix and last part of url in Laravel
I have a group route like this PHP LARAVEL 9 In the controller side I want to obtain the accomodations part and the italy greece part without slashes. I’m doing like this PHP LARAVEL 9 This works but the way I’m manipulating the request in $listType seems a little bloated to me, is there a cleaner way in laravel? Answer
Remove query string parameter to create a more user-friendly URL
I have this .htaccess file and I have no knowledge with mod_rewrite, What I want to achieve is to have localhost/viewticket/${id} instead of localhost/viewticket.php?id=123 I have tried many .htaccess rules but none worked except this one that hides .php in my URL. Answer I created this one for you, just erase yours and copy this one enjoy^^
Get Laravel route with optional parameter
I was wondering if it’s possible to get the full url/path in Laravel with a optional parameter in it. In web.php I have this: And want to get the full url/path with this: But only ‘var1’ appears. How come? In the manual there are no examples. Answer The parameters should be in an array like:
Checking the existing of a file by url inside native php router
I would like to know how could I check the existing of a file by a given url inside native php router (index.php) here is what I’ve tried : Inside (index.php) The page takes long time to output a message ‘Warning: get_headers(http://[website]/test): failed to open stream: HTTP request failed’ may be due to reccursion. How can I solve that without
Laravel URL Filtering with GET
I am building a simple Laravel routing to display an array when someone goes to http://127.0.0.1:8000/planets But I need to make a filter to check the array on what request has been send on the URL. For example: http://127.0.0.1:8000/planets?planet=mars I need to make sure that if a GET parameter is present, you filter the array based on whether the planet
How to make route in laravel using GET Page?
Before using laravel, usually I route my page using code like this: Is there anyway that I can route my page like that but in Laravel? I prefer to use format : www.example.com/?page=schedule rather than www.example.com/schedule Answer Documentation: https://laravel.com/docs/8.x/routing
Change Routing in Zend Framework for SEO
I am new to Zend framework and using framework 2.0 , And I want user Friendly URL for My Site. Right Now my URL for Contact us page is http://local.example.com/application/index/contact but I want http://local.example.com/contact like this. My Module name is Application and Controller name is IndexController (moduleApplicationsrcApplicationControllerIndexController.php) Here is my module.config file Answer You need to add a new Literal
Laravel 7 previous and next records with alphabetical order
In my edit form, I want to add a button to save and edit the following user. I am trying that the “next” button takes me to the next record in alphabetical order. I have only managed to order by ID Answer You need to use the rank function of mysql and raw query For previous record For next record