Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Files

Latest commit

0457d4d · Nov 1, 2020

History

History

demo-laravel

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 4, 2020
Jun 20, 2020
Oct 11, 2020
Nov 1, 2020
Jun 20, 2020
Sep 9, 2020
Sep 27, 2020
Oct 4, 2020
Sep 6, 2020
Jun 20, 2020
Jun 20, 2020
Jun 20, 2020
Jun 20, 2020
Jun 20, 2020
Jun 20, 2020
Jun 20, 2020
Jun 20, 2020
Sep 9, 2020
Sep 10, 2020
Jun 20, 2020
Nov 1, 2020
Nov 1, 2020
Sep 9, 2020
Jun 20, 2020
Jun 20, 2020

Bookstore API Demo

This demo project is the API backend used by separate Vue CLI bookstore admin demo project, and is a good showcase for backend-side development. It's also a good platform for developing external Laravel Admin composer package.

Access to online demo
The okami101/laravel-admin composer package is directly symlinked to packages/laravel root git submodule folder of this repo.
So direct live package development is fully working, even inside docker !

Features

  • Common API bookstore resources with :
    • Publishers
    • Authors
    • Books
    • Reviews
  • All Laravel package features (account profile, sanctum auth, impersonation, docker files, etc.)

How to run

cp .env.example .env
# adapt docker environment variables for your own available free host port  
docker-compose up
# initialize laravel app and db schema
docker-compose exec laravel init
# for development purpose, initialize
docker-compose exec laravel seed

Laravel app should be loaded at default http://localhost:8000.
You can access phpMyAdmin via default http://localhost:9000.

For artisan commands, just use docker-compose exec laravel php artisan my:command.
Access to tinker : docker-compose exec laravel php artisan tinker
For full DB reset + dummy data : docker-compose exec laravel php artisan migrate:fresh --seed

cp .env.example .env
# remove DB_HOST,REDIS_HOST,CACHE_DRIVER,SESSION_DRIVER variables which ar default setted for docker
# adapt other environment variables to your local settings, check Laravel documentation
composer install
php artisan key:generate
php artisan storage:link
php artisan elfinder:publish
php artisan migrate:fresh --seed

License

This project is open-sourced software licensed under the MIT license.