Laravel: Unterschied zwischen den Versionen

Aus Vokabulabor
Zur Navigation springen Zur Suche springen
Zeile 12: Zeile 12:
composer require spatie/laravel-permission
composer require spatie/laravel-permission
php artisan ui bootstrap --auth
php artisan ui bootstrap --auth
dbtool create-db-and-user app$PROJ $PROJ "$PASSW"
dbtool create-db-and-user lrv$PROJ $PROJ "$PASSW"
sed -i -e "s/DB_DATABASE=.*/DB_DATABASE=app$PROJ" \
sed -i -e "s/DB_DATABASE=.*/DB_DATABASE=lrv$PROJ" \
   -e "s/DB_USERNAME=.*/DB_USERNAME=$PROJ" \
   -e "s/DB_USERNAME=.*/DB_USERNAME=$PROJ" \
   -e "s/DB_PASSWORD=.*/DB_USERNAME=$PASSWD" .env
   -e "s/DB_PASSWORD=.*/DB_USERNAME=$PASSWD" .env

Version vom 28. Oktober 2023, 19:09 Uhr

Links

Projekt einrichten

PROJ=langutor
PASSW=topsecret
BASE=/home/ws/php/$PROJ
cd $(basename $BASE)
composer create-project laravel/laravel $PROJ
cd $BASE
composer require laravel/ui
composer require spatie/laravel-permission
php artisan ui bootstrap --auth
dbtool create-db-and-user lrv$PROJ $PROJ "$PASSW"
sed -i -e "s/DB_DATABASE=.*/DB_DATABASE=lrv$PROJ" \
  -e "s/DB_USERNAME=.*/DB_USERNAME=$PROJ" \
  -e "s/DB_PASSWORD=.*/DB_USERNAME=$PASSWD" .env

Projekt aktualisieren

npm install
npm run dev