Deploying React Laravel projects
If you are using Laravel as an API for the React.js application then set up the laravel project first. It is the backend here so set up the routes for the project. Use Urls for the SPI unique from other Urls Laravel is using. If your Laravel version has a Gup/build tool named Elixir it is for looking up script files etc in the resources folder so keep your files in its respective folders. After running the Elixir task for building the app the bundled app.js files will be put in the public/js/app.js folder. Laravel views take a public directory as default root directory so reference your built files in the index page as js/app.js. Then setup Routes for Laravel index page and API files. Route ‘/’ and all routes other than API to make index page view where we load our React.js application file.
Route::get('/', function () { return View::make('pages.index'); }); Route::group(['prefix' => 'api'], function () { Route::get('tasks', 'TodosController@index'); });
To map requests to controller actions, set up the routes. As long as the deployment goes, build the code and load it into the index page.
sam smith
16 Apr 2023
I just want the whole world to know about this spell caster I met two weeks ago, I cannot say everything he has done for me my wife left me 3 years ago left with my kids I was going through online when I meant this wonderful man's testimony online I decided to give it a try and my wife is back to me now and we are happily married again cause is too much to put in writing all I can say is thank you very much am very happy Contact him today on oseremenspelltemple@gmail.com or whatsapp him on +2348136482342. www.facebook.com/Dr-odion-spell-temple-110513923938220