Questions tagged [laravel-routing]

Routing in Laravel Framework's MVC implementation. Laravel is a free, open source PHP web application framework, and it is released under the MIT license.

laravel-routing is a tag suitable for any questions regarding routing in Laravel's MVC implementation, url handling, or any other matter affecting or affected by routing in Laravel.

2207 questions
5
votes
1 answer

Redirect to route not working in Laravel 5

I have an app where the user submits a form which performs a SOAP exchange to get some data from a Web API. If there are too many requests in a certain time, the Throttle server denies access. I have made a custom error view for this called…
John Dawson
  • 443
  • 3
  • 10
  • 28
5
votes
3 answers

Proper way to create controllers under a subfolder in laravel 5

I have been struggling with this issue for the pas hour and I'm not sure what have I done wrong. So the case is like this. I wanted to create a controller folder go group different controllers into their groups. By default laravel projects created a…
Kenny Yap
  • 1,317
  • 5
  • 17
  • 39
5
votes
1 answer

Laravel 5 localization: exclude /public/ directory

I am trying to implement localization in my Laravel 5 project and I'm running into an issue. The middleware that I put in to catch the language is as follows:
watzon
  • 2,401
  • 2
  • 33
  • 65
5
votes
1 answer

Laravel conditional View for https

I want to return a view from my controller function with https or http depending on a variable. I don't want to redirect it to https or http and I only want to use View::make() or Response::view() function. Is it possible? Example: public function…
5
votes
2 answers

Multiple Laravel 5 and AngularJS Apps

I'm currently working on a project which has multiple loosely coupled modules (20+) and i have decided to go with Laravel 5 and AngularJs. I'm using yeoman angularify generator for AngularJS. I can't decide on application structure, i would ideally…
5
votes
2 answers

Laravel Image Cache slower than source

I am using Intervention/imagecache to cache my image. However the cache image load slower than the source image file. Almost extra 60-70ms in time latancy (Tested in chrome inspect element network) This is the code how I load the image at…
Eric
  • 1,547
  • 2
  • 18
  • 34
5
votes
2 answers

Laravel MethodNotAllowedHttpException on POST form

I'm having an odd issue with a POST form in Laravel. When sending a post request, my Laravel throws an MethodNotAllowedHttpException. Upon looking into the errormessage, I can see that Laravel thinks that my request is a GET request, which it is…
Fizk
  • 1,015
  • 1
  • 7
  • 19
5
votes
1 answer

Request::getQueryString() without some parameters

I am using the following code to append the query strings with two links. But I want to exclude the page parameter of pagination from the query string.
  • Teachers
  • Hassan Saqib
    • 2,597
    • 7
    • 28
    • 51
  • 5
    votes
    1 answer

    Can I use Laravel 5 Middleware to allow packages to override app routes?

    I would like to be able to override the routes defined in app/Http/routes.php with a route in a package. For example, in app/Http/routes.php I might have this: Route::get('/search/{type?}',['as' => 'search','uses' => 'SearchController@search']); I…
    5
    votes
    2 answers

    Keep form values when redirect back in Laravel 4

    I'm trying to keep the values of a form when Redirect::back on Laravel 4, but I can't find a way to do this. This is my form: {{ Form::open(array('route' => 'generate', 'files' => true)) }} {{ Form::radio('myType', '1', true); }} {{…
    Gerard Reches
    • 3,048
    • 3
    • 28
    • 39
    5
    votes
    4 answers

    How can I delete a post resource in laravel 5?

    Laravel 5 version I am working on a project with the new laravel 5 release and for some reason i cannot delete a post, when I press delete it just redirects me to the post show page with the id such as /post/3 and I get a blank white page, when I go…
    M dunbavan
    • 1,157
    • 5
    • 22
    • 57
    5
    votes
    1 answer

    Route using either a prefix or a domain

    I am working on a platform that allows users to run their own site in either a sub folder of the main website domain, or map a custom domain for their site. When using a custom domain the URL structure for each route is slightly different in that it…
    Johnboy
    • 425
    • 5
    • 14
    5
    votes
    1 answer

    How to create a sub- domain in laravel

    I am trying to create a sub-domain in laravel. The subdomain will be something like merchant.example.com and they will be more links such as merchant.example.com/login merchant.example.com/myaccount so this is what I tired Route::get('.partner/',…
    Baako
    • 263
    • 2
    • 4
    • 11
    5
    votes
    1 answer

    Laravel - Overriding a resource route into a different route filter group

    Laravel's routing doesn't seem to be working as expected? From what I understand, if I intend to override a route, all I need to do is to put the expected route before the other one. What I have is something like…
    He Hui
    • 2,196
    • 4
    • 29
    • 46
    5
    votes
    3 answers

    Laravel 4: Redirect a post request to different controller method

    I have a controller like below, MyController: public function methodA() { return Input::get('n')*10; } public function methodB() { return Input::get('n')*20; } I want to call the a method inside MyController according to POST value. …
    palatok
    • 1,022
    • 5
    • 20
    • 30