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

How can I change the landing page after a success Laravel login?

I am absolutly new in Laravel and I have the following problem. I am using Laravel 5.3. When I perform the login from my login page it automatically land me on this home page: http://localhost:8000/home My doubt is: how can I change the landing…
AndreaNobili
  • 40,955
  • 107
  • 324
  • 596
0
votes
2 answers

URL friendly in routes

I'm creating url friendly in my app, but it's not working, the app is giving me some issues related with "-". It's giving me an error of: ErrorException in PostController.php line 60: Trying to get property of non-object My ideal URL…
Pedro
  • 1,459
  • 6
  • 22
  • 40
0
votes
1 answer

php - Boolean parameter in address, how pass to method?

I have this method: public function getAll( $name = false, $json = false ) { if ( $name ) $sections = Sections::all()->pluck( 'name' ); else $sections = Sections::all(); return ( $json ) ?…
Damian
  • 525
  • 2
  • 11
  • 24
0
votes
1 answer

Call to undefined method Illuminate\Database\Query\Builder::hasAnyRole() error on Laravel 5.3

So I'm trying to verify a user's role when accessing the web app upon log in. I have a users table, roles table, and a role_users table users table --------| user_id | other important fields | roles table --------| role_id | role_desc | role_users…
Eggnog654
  • 115
  • 2
  • 9
0
votes
1 answer

Basic route with paramter failing in Laravel 5.3

I have a basically fresh install of Laravel 5.3 and I wanted to look into passing parameters to a route. I literally copied this from Laravel Docs,, Route::get('user/{id}', function ($id) { return 'User '.$id; }); When I try to access the…
GRowing
  • 4,629
  • 13
  • 52
  • 75
0
votes
1 answer

Misbehaviour on routes with Laravel 5.3 and AngularJS 1.5

I try to create an app with Laravel 5.3 and AngularJS. I want to use the routes and templates from Angular instead of Laravel. Here is the web.php file from Laravel: Route::get('/', function () { return view('index'); }); And here is a part of…
Tasos
  • 7,325
  • 18
  • 83
  • 176
0
votes
1 answer

Laravel + Digital Ocean + Serverpilot = Domain routing

i have server from Digital Ocean. I use Serverpilot. How do i domain routing using by laravel 5.3 ? Rweb example : Route::group(['domain' => 'admin.developer.app'], function () { Route::get('/', function () { return view('dash')…
Murat Güven
  • 25
  • 1
  • 5
0
votes
3 answers

laravel is giving error on custom controller used in routes

I have a simple in routes/web.php file Route::get(Config::get('constants.ADMIN_PATH') . '/categories', 'AdminControllers\AdminPagesController@index'); I have made a folder AdminControllers and inside that there is a controller named…
Habib
  • 591
  • 8
  • 29
0
votes
2 answers

Pass complex parameter to route middleware

Is there any way to pass complex parameter (for example array of objects) to middleware in laravel? I know that I can pass strings via some kind of DSL but I need to pass some more complicated data to one of middlewares. Is this achievable? And if…
kadet
  • 94
  • 1
  • 7
0
votes
1 answer

Laravel using an OR style combination in Route Middleware

I am trying to use multiple middleware in a route as follows Route::get('devices', ['as' => 'devices.index', 'uses' => 'deviceController@index', 'middleware' => ['permission:manage_devices', 'permission:device.view']]); This will implement AND logic…
dmSherazi
  • 3,743
  • 5
  • 37
  • 62
0
votes
2 answers

Laravel 5.2 Route not working when using resource for CRUD operation

I am attempting to get familiar with the Laravel framework. I have been following a tutorial and am stuck at a portion with routing. I have a simple Blog project that is attempting to create and edit a blog post. I already have 2 other objects CRUD…
Chris
  • 600
  • 7
  • 15
0
votes
1 answer

Custom naming in router resources

i have in my controller public function details($id) { $claim = Claim::findOrFail($id); $details = $claim->details; return response()->json([], 200); } and I have in my routes Route::resource('claims',…
Kendall
  • 5,065
  • 10
  • 45
  • 70
0
votes
2 answers

NotFoundHttpException in RouteCollection in Laravel

First And For most, I wouldn't ask here if I didn't do some research myself yet, I saw many similar titled Questions, but they seem to not be the same problem that I have. =Actual Start= So I am following this Web Tutorial Series called Laravel 5.2…
Akira Hora
  • 458
  • 1
  • 6
  • 18
0
votes
1 answer

Laravel middleware returning 405 when using ajax

I'm logged into my website and the page I'm currently on requires the admin middleware. I've also got an api call I'm making from this page. This api call is also going through the same admin middleware and is in the api.php file (laravel 5.3). …
Jake Sylvestre
  • 936
  • 3
  • 14
  • 39
0
votes
1 answer

Get route list from parent route group in laravel

Here is the simple routing code: (i take it from official site just for example) Route::group(['middleware' => 'auth'], function () { Route::get('/', function () { }); Route::get('user/profile', function () { }); }); Is it…
SergioZhidkov
  • 371
  • 1
  • 3
  • 13
1 2 3
99
100