Questions tagged [laravel-route]
33 questions
5
votes
4 answers
how to pass different dynamic parameters at same position to access different view pages in laravel
These are my routes for which I am facing problem
Route to get the list of registered places in a particular city
Ex: http://localhost:8000/London, http://localhost:8000/London/Restaurants
Route::group(['namespace' => 'Page'], function() {
…

Prateek
- 1,229
- 17
- 31
2
votes
3 answers
Laravel 7.x name routes in routes group
I'm learning Laravel and I wanna group some routes using prefix and naming each route so I got something like this
Route::prefix('customers')->group(
function(){
Route::get('/', 'CustomerController@index')->name('customers.index');
…

Roberto Maciel
- 102
- 1
- 6
2
votes
2 answers
Laravel cviebrock/eloquent-sluggable put @ as prefix or filter it in route
Laravel version 7.0, I am using cviebrock/eloquent-sluggable package.
What I want is to put @ as prefix to the username.
I included Sluggable trait in User model and set like this.
public function sluggable()
{
return [
'username' => [
…

LoveCoding
- 1,121
- 2
- 12
- 33
2
votes
0 answers
Laravel /admin route cannot goto another Routes, always back to /admin
I have a problem with my Admin routes, everytime I was login as admin, it always redirect to /admin, and I cannot access another routes like /articles or /users. I can only access route like /welcome or /password/reset
I have tried to fix my…
2
votes
3 answers
Laravel: REJECT ROUTE not defined but exists in web.php
I have a reject function in my Calendar controller but whenever I redirect to the view page it displays an error saying my route is not defined.
I've tried rearranging and renaming my route but it's still displaying the error.
Here is my form:
{!!…

danedelions_swift
- 115
- 1
- 12
1
vote
1 answer
Laravel pretty url in edit method
can someone tell me how can I still have pretty URL when trying to edit my post? I have slugs etc but for edit method, we need to use GET|HEAD which means we will have something like…

Sead Silajdzic
- 298
- 1
- 4
- 21
1
vote
4 answers
Laravel : errors is not showing
I am using resource in laravel and i wanna a custom uri route for (show) action my route is:
Route::resource('/admin/users', 'UsersController')->except(['show']);
Route::get('/admin/users/{user}/show', 'UsersController@show')->name('users.show');
i…

Nima
- 91
- 1
- 12
1
vote
3 answers
How to select specfic id and update in Laravel?
I'm studing Laravel CRUD.
Laravel Framework is 6.18.15
I would like to select of a record and update.
This is photo gallery.
Now if I click one of photo I can get below URL
https://mywebsite.net/public/edit?id=59
but in edit.blade.php I got this…

greeniron
- 131
- 11
1
vote
2 answers
Route is not identified in Laravel route
I have been trying to learn laravel, but for some reason my routes are not identified specially in those cases where I need to pass route parameters like id.
This is my…

MaestroAshmin
- 17
- 3
1
vote
1 answer
Laravel Route [events_page] not defined. error
I'm still making my events page, yet another error. I'm making an archive function and I've setup the route correctly, however now that I've created the "events_archive" route, "events_page" for some reason is playing up and throwing this error:…

tzcoding
- 69
- 6
1
vote
3 answers
How to Redirect using two parameter in Controller using Laravel 5.5
Controller is :
elseif ($profile_is_exsit > '0')
{
$url = DB::table('marriage_bureau')->select('title','custom_id')->where('user_id',$user_id)->first();
$title = $url->title;
$custom_id =…

HappyCoding
- 33
- 1
- 4
1
vote
0 answers
Laravel Undefined Offset 0 Error Leading up to "Illuminate\Foundation\Http\Kernel handle"
I'm having a very hard problem seemly after make an multi-oauth configuration for admin and salesperson. But in fact, i really don't know what caused this problem. Because of it, i really appreciate your humbleness to help me on this one.
When tried…

Farhan Fauzan
- 11
- 3
1
vote
1 answer
Laravel Redirect to Login page after Post Request
I am inserting a form data into a database, after successful submission I want to redirect to the leads page.
HTML Form:
1
vote
2 answers
pass parameters/data in hyperlink - laravel blade
I am trying to pass data from one page to another via hyperlink. Here is url.
click here
My Route:-
Route::get('page-name/{sometext}', 'MyController@pagename');
In Controller:-
function pagename(Request…

Sajjad Ali
- 156
- 9
1
vote
3 answers
Optional route parameters not working in Lumen 5.7
I had defined my route and controller as following
$router->group(['prefix' => 'api/v1'], function ($router) {
$router->group(
['middleware' => 'auth'], function() use ($router) {
…

Mahesh.D
- 1,691
- 2
- 23
- 49