Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to route react from laravel

You can return your index page and browserHistory of React will handle anything else.

Route::pattern('path', '[a-zA-Z0-9-/]+');
Route::any( '{path}', function( $page ){   
     return view('index');
});
 
PREVIOUS NEXT
Tagged: #route #react #laravel
ADD COMMENT
Topic
Name
9+1 =