56
Laravel Views with React Components
To Add React with Laravel from scratch, there are many important details you need to consider:
- Configuring React
- Adding State management systems like Redux and configuring store, actions and sagas for API calls
- Configuring Routes for React Components
- Authentication
- Configuring ESlint for effective code
These configurations might require more time. To avoid these and focus only on developing the App functionalities, You have laravel-react-boilerplate.
Laravel React Boilerplate helps to fasten your development, Instead of spending more time on configuring React and SPA Authentication.
It is Pre-Configured with
- Laravel 8
- Laravel Sanctum for SPA Auth
- React 17
- Redux
- React Router
- Axios
- Ant Design
- Redux-Saga
- Sass
- ESLint
- Preconfigured redux store, actions and saga.
- User Login
- User SignUp
- Auth Routes
You can choose either one for your development
- Laravel Homestead
- Laravel Sail
Basic needs
- Composer 2.
- Node stable version.
- Install using composer
composer create-project nilanth/laravel-react-boilerplate
cd laravel-react-boilerplate
Run yarn install
- Create a Database
- Update the Database credential to .env file
- Run
php artisan migrate
-> To create needed tables. - Run
php artisan db:seed
-> To seed some fake users. - Run
yarn run dev
- Update
API HOST_URL
in resources/js/config/constant.js file
Use Laravel React Boilerplate to fasten your development π
Need to learn more? Feel free to connect on Twitter :)
56