# Installation
Here you can find installation guide for the API. Follow the steps and if you will jump into any problems contact with other devs, they will help you.
- Clone repo
- Install postgresql
- Install composer packages:
composer install
- Copy
.env.example
to.env
and.env.testing.example
to.env.testing
- Generate laravel key:
php artisan key:generate
- Migrate fresh data to DB:
php artisan migrate:fresh --seed
# DB & USER
sudo -u postgres psql
create database mai;
create database mai_testing;
create user usermai with encrypted password 'passwordmai';
alter user usermai CREATEDB;
grant all privileges on database mai to usermai;
grant all privileges on database mai_testing to usermai;
# Copy .env
cp .env.example .env
cp .env.testing.example .env.testing
# Example DB ENV
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=mai
DB_USERNAME=usermai
DB_PASSWORD=passwordmai
# Synchronize repository submodules:
git submodule update --init --recursive
or
git submodule foreach git pull origin master
# Install MailHog (opens new window) for SMTP testing and configure email driver in .env
file, for example:
MAIL_DRIVER=smtp
MAIL_HOST=127.0.0.1
MAIL_PORT=1025
MAIL_ENCRYPTION=null
MAIL_FROM_NAME="MTOOLS"
MAIL_FROM_ADDRESS=no-reply@mtools.pl
# Install MeiliSearch (opens new window) search engine and create necessary Scout indexes:
php artisan scout:indexes
Remember to run queue worker using command
php artisan queue:work
.