Laravel example project used for common programming approaches demonstration.
Project serves as on-line book library, when registered users can borrow a book for a limited time period. In order to use the library user should purchase a subscription, which requires recurring payment.
Documentation is at docs/README.md.
- PHP >= 7.3.0
- Nginx
- MySQL >= 6.0
- Yarn package manager
- Redis 3+
- Supervisor
- Node.js >=14.0, <= 15.0
- Clone this repository
- Create and fill
.env
file from.env.example
- In project folder make
composer project-install
- Add
php artisan schedule:run
command to crontab
Crontab example:
* * * * * cd /path-to-project && php artisan schedule:run >> /dev/null 2>&1
- Pull changes from remote repository
- In project folder make
composer project-update
- Remove cron tasks (see in: storage/app/crontab)
Braintree is used as system payment gateway.
Project uses Google reCAPTCHA for the form robots protection.
Its integration configured via RECAPTCHA_SITE_KEY
and RECAPTCHA_SECRET_KEY
.
These can be obtained from https://www.google.com/recaptcha/admin.
Use following console command to setup data for the manual testing:
php artisan db:seed --class DemoSeeder
Run both Unit and HTTP tests:
cd /project/root
vendor/bin/phpunit
Run Unit tests:
vendor/bin/phpunit tests/Unit
Run HTTP tests:
vendor/bin/phpunit tests/Feature