Skip to content
Advertisement

Tag: routes

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

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

Advertisement