Install

You need this to use Bookshelves, check technologies before installation

Setup

Download dependencies

composer install

Setup command (easy way)

Execute setup and follow guide

php artisan setup

About environment variables, you can check .env page

Manual

Create .env

cp .env.example .env

Set database informations in .env

DB_DATABASE=bookshelves
DB_USERNAME=root
DB_PASSWORD=

For more details you can check .env page

Generate key

php artisan key:generate

Download NodeJS dependencies

yarn

Generation API documentation

php artisan scribe:generate

Migrate database

php artisan migrate

Execute Laravel mix

yarn prod

Serve app

php artisan serve

Your app is available at http://localhost:8000

Production rights

For Linux Debian-like only, give rights for www-data group on storage and bootstrap/cache

chown -R $USER:www-data *
chmod -R ug+rwx storage bootstrap/cache

WARNING use this command if you haven't any custom changement Previous command will add tracking changes for git, skip it with this command

git checkout .

Assets

Execute Laravel mix

yarn dev

Minified for prod

yarn prod

To have Browsersync, you have to serve app with php artisan serve at http://localhost:8000

yarn watch

You app with Browsersync is on http://localhost:8001

Webhook

If you use Webhook to get update from your git forge, you can setup .git/hooks/post-merge with this config

#!/bin/bash

php artisan cache:clear
php artisan config:clear
php artisan view:clear

composer install
php artisan config:cache
php artisan view:cache
php artisan route:cache
php artisan scribe:generate

yarn
yarn prod
Edit this page on GitHub Updated at Tue, Apr 12, 2022