Skip to content

Repository files navigation

php-react-boilerplate.png

php-react-boilerplate2.png

PHP React Boilerplate API

(03-Mar-2022) A Laravel 13.x boilerplate with React 19 Redux SPA.

Using Postman?

Get Postman HTTP client.

Postman API Collection for PHP React Boilerplate.

Postman API Environment for PHP React Boilerplate.

Installation

# Create our environment file.
cp .env.example .env
# Update database values in .env file.
# Install our app dependencies.
composer i
php artisan key:generate
# Link storage/public to public/storage folder.
php artisan storage:link
# Before running the next command:
# Update your database details in .env
php artisan migrate:status --path=database/migrations/V1
php artisan migrate --path=database/migrations/V1 --seed

Frontend Installation

npm install --global yarn
yarn install
yarn build

Usage

php artisan serve --port=8000
# Website accessible at http://localhost:8000

API Documentation

php artisan route:list

Feature Tests

php artisan test --filter=API

View the feature test code here.

Sending & Viewing Test Emails

Requirements

docker run -p 8025:8025 -p 1025:1025 mailhog/mailhog

Ensure MAIL_MAILER setting in your .env file is set to smtp. After running the above command this app should now be able to connect to the Mailhog email server running through Docker.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

BSD

About

(03-Mar-2022) A Laravel 13.x boilerplate with React 19 Redux SPA.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages