how to create exception in react router using Route get path IndexController index - name index - where path

0 votes

I am using react routers within Laravel 8 . The all autentification is working fine using Fortify.

React routers are working fine but till I used

Route::get('/{path?}', 'IndexController@index')->name('index')

->where('path', '.*');

the authentification is not rendered any more .

Is there a way to create an exception within

Route::get('/{path?}', 'IndexController@index')->name('index')

->where('path', '.*');  ?

Nov 14, 2020 in Laravel by datso
• 120 points

recategorized Nov 16, 2020 by Niroj 47 views

Add the react-router-dom, using the following:

$ npm install --save react-router-dom $npm run dev

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Laravel

0 votes
1 answer

How to get route action name in laravel?

Hello @kartik, To get action name, you need ...READ MORE

answered Sep 27, 2020 in Laravel by Niroj
• 82,540 points
228 views
0 votes
1 answer

How to get a list of registered route paths in Laravel?

Hello, Route::getRoutes() returns a RouteCollection. On each element, you can ...READ MORE

answered Mar 31, 2020 in Laravel by Niroj
• 82,540 points
494 views
0 votes
1 answer
0 votes
1 answer

How to get a variable name as a string in PHP?

Hello @kartik, You can use this: function varName( $v ...READ MORE

answered Sep 29, 2020 in Laravel by Niroj
• 82,540 points
80 views
0 votes
1 answer

How to get the subdomain in a subdomain-route in laravel?

Hello, $subdomain is injected in the actual Route callback, it is ...READ MORE

answered Nov 2, 2020 in Laravel by Niroj
• 82,540 points
232 views
0 votes
1 answer

How to get a list of registered route paths in Laravel?

Hello, Route::getRoutes() returns a RouteCollection. On each element, you can ...READ MORE

answered Nov 11, 2020 in Laravel by Niroj
• 82,540 points
56 views
0 votes
1 answer

How to identify wheather the request is HTTP GET or HTTP POST in Laravel?

Hey, In order to identify the type of ...READ MORE

answered Mar 19, 2020 in Laravel by Niroj
• 82,540 points
164 views
0 votes
5 answers

How to get user's IP address in Laravel?

Looking at the Laravel API: Request::ip(); Internally, it uses the getClientIps the ...READ MORE

answered Dec 15, 2020 in Laravel by Roshni
• 10,400 points
13,905 views
0 votes
1 answer

How can we create a record in Laravel using eloquent?

We need to create a new model ...READ MORE

answered Mar 20, 2020 in Laravel by Niroj
• 82,540 points
159 views
0 votes
1 answer

What is database migration and how to create database migration in Laravel?

Hii, Migrations are like version control for your database, ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,540 points
544 views