Skip to content

NikitaSomik/simple-laravel-api

Repository files navigation

Simple Laravel Event API

Installation

  1. Clone the project [email protected]:NikitaSomik/simple-laravel-api.git

  2. ####Run through docker-compose in root directory project simple-laravel-api

  3. Copy .env.example to .env

    cp .env.example .env
  4. Copy .env.testing.example to ..env.testing

    cp .env.example .env
  5. Download composer docker image to install dependencies.

    docker run --rm --interactive --tty -v $(pwd):/app composer install
  6. Configure a shell alias that allows you to execute Sail's commands more easily

    alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail'
  7. Build and run project with sail in daemon mode

    sail up -d --build
  8. Generate app key

    sail exec -it laravel.test php artisan key:generate
  9. Create symlinks for storage

    sail exec -it laravel.test php artisan storage:link
  10. Run migrations and seeds

sail exec -it laravel.test php artisan migrate --seed
  1. Run laravel-worker by supervisorctl

    sail exec -it laravel.test supervisorctl start laravel-worker
  2. API Documentation

    http://localhost/docs/api#/
  3. Web UI Supervisor

    http://localhost:9001
  4. Health App

    http://localhost/up
  5. Generate IDE Helper File

  • sail exec -it laravel.test php artisan ide-helper:generate - PHPDoc generation for Laravel Facades
  • sail exec -it laravel.test php artisan ide-helper:models -M - PHPDocs for models
  • sail exec -it laravel.test php artisan ide-helper:meta - PhpStorm Meta file
  • sail exec -it laravel.test php artisan ide-helper:eloquent - Adds Eloquent, Database\Eloquent\Builder, and Database\Query\Builder to the base model class. This is done right in the vendor directory. This gives a hint to the models that they have all the query builder methods. It is very convenient if you use scope functions.
  1. Run tests

    sail exec -it laravel.test php artisan test
  2. Run Larastan (PHPStan)

    sail exec -it laravel.test composer phpstan
  3. Run Laravel Pint

    sail exec -it laravel.test ./vendor/bin/pint

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published