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
0
votes
1 answer

Why after migrate a Laravel application on my remote server this route doesn't work?

this is the first time that I try to migrate a Laravel application from my local environment to my remote server. So basically I have uploaded the entire content of my local Laravel 5.4 application into this folder of my remote…
AndreaNobili
  • 40,955
  • 107
  • 324
  • 596
0
votes
5 answers

Laravel 5.2 delete function gave me NotFoundHttpException

I'm using Laravel 5.2 and trying to do an add and delete a data that I already Inputted but when i clicked "Delete" button it gave me NotFoundHttpException. Here's example of my delete function code in controller:
0
votes
1 answer

How to send data from laravel route to controller function?

I've a laravel route Route::get('/find/mobiles','SearchController@byCategory'); I want send values to byCategory method from the route file, something like $category='mobile' or $category = 'television' I'm unable to find any way to do it.
runningmark
  • 738
  • 4
  • 13
  • 32
0
votes
1 answer

Laravel: Skip some params from route or call Controller@show without adding 'static' adding

Laravel: 5.4 It works, But I want to know if there are other pro-solutions. I have a route like this Route::get('{any}-a{id}', function($any, $id) { return ArticleController::show($id); })->where(['id' => '[0-9]+', 'any' => '.*']); But this…
Onfealive
  • 70
  • 8
0
votes
1 answer

How can I prevent that a Laravel controller method handle HTTP Request that doesn't have the expected parameters list?

I am pretty new in PHP and moreover in Laravel. I came from Java and I am a Spring MVC developer. Now I am using Laravel 5.4 for a project. I have the following doubt related to the possibility to create Laravel controller method that handle HTTP…
user7536391
0
votes
2 answers

POST Route (via form) Vs. GET Route (post via URL Params)

I never understand these 2 completely, can someone please put an end to this ? I have 2 routes : 1- Route::get('/admin/dashboard', 'DashboardController@dashboard'); 2- Route::post('/admin/dashboard', 'DashboardController@dashboard_post'); If I do…
code-8
  • 54,650
  • 106
  • 352
  • 604
0
votes
1 answer

Laravel 5.3 Login Routes - NotFoundHttpException in RouteCollection.php

I'm trying to build up my new project and i'm using Laravel 5.3. My problem is, that the auth routes doesn't work like expected.. I allways get the following error: NotFoundHttpException in RouteCollection.php I removed the laravel auth routes that…
0
votes
1 answer

Adding value to a model from url params in laravel 5

Playing around with a referral system in laravel 5.4. I have been able to create a unique shareable link for each user. When another user clicks on that, I want the portion of the url with the referral id of the link's original owner to be added to…
0
votes
1 answer

Method App\Http\Controllers\ProductController::getIndex()() does not exist

web.php file this is my web.php file using laravel 5.4
0
votes
1 answer

even after adding use Class i get FatalErrorException in Model.php line 876: Class 'Matiere' not found

2 my application show the teacher**(profs)** and if i click on a prof it shows me the subjects that he teach (matiere). so i have Model Profs:
0
votes
1 answer

Laravel route, GET paramters in routes

What we want to do Get clean url like this domain.com/student/query/your+search+query domain.com/student/subject/subject-name/chapter/chapter-name subject-name, chapter-name is parameter domain.com/student/subject/subject-name subject-name is a…
0
votes
1 answer

web middleware for specific routes in laravel 5.2

In Laravel 5.4 the web middleware is included on all routes by default. But I want to show those routes(menu's) assign to users. For example I have some routes(menu's) as follows user\list user\add user\show_form list\forms if user 'ABC' assign…
sandip kakade
  • 1,346
  • 5
  • 23
  • 49
0
votes
1 answer

How can I declare a route and a controller method that explicitly expect two query parameters like this?

I am pretty new in Laravel and I have the following problem. I have to declare a route that handle requests like this: http://laravel.dev/activate?email=myemail@gmail.com&token=eb0d89ba7a277621d7f1adf4c7803ebc So this URL have to mantein this…
user7540582
0
votes
2 answers

Laravel New Middleware not working

I have a problem in my project, i just try to fix in many hours but it still not working. I've created a new middleware - here is my code: class CpanelAuthentication { public function handle($request, Closure $next, $guard =…
0
votes
3 answers

Use js function variable in route

I want to pass ID to my route via ajax but cant do that: function test(id){ $('#items').DataTable({ ajax: { url: '{!! route('routename', ['menu_id' => id]) !!}', type: 'POST' }, It says Use of undefined constant…
meph
  • 209
  • 1
  • 5
  • 16