Menu

Use Lumen for API

2018-12-30 - Laravel

https://lumen.laravel.com/

PJ=vcapi;
composer global require "laravel/lumen-installer";
lumen new $PJ;
cd $PJ;
composer update;
cp .env.example .env;
php -S localhost:8000 -t public;

If mysql is not running on your local PC, you have to make it run.
In the case of Mac,

brew update;
brew install mysql;
brew upgrade mysql;
brew info mysql;

sudo mysql.server start;

mysql;

create database $DBNAME character set utf8mb4;
CREATE USER '$USERNAME'@'localhost' IDENTIFIED BY '$USERPASSWORD';
GRANT ALL PRIVILEGES ON $DBNAME.* TO'$USERNAME'@'localhost';