Blogify Back End

This is the back-end of my Blogify project, it uses Laravel as a REST API. It is still a work in progress...

Prerequisite

You will need to have Docker/Docker Desktop installed or Composer and PHP to run this API.

To start the project, follow these steps:

  1. Set up environment by copying the example environment file:
  2. cp .env.example .env
  3. Install all dependencies:
  4. composer install
  5. Run the migrations and seed the database:
  6. php artisan migrate:fresh --seed

    Then finally to start the app run:

    php artisan serve

    If you don't have composer on you computer or you want to use Docker then you can:

    cd /path/to/the/laravel/project docker run --rm -v $(pwd):/app -w /app composer install
  7. Spin up docker containers:
  8. ./vendor/bin/sail up
  9. Run the migrations and seed the database:
  10. ./vendor/bin/sail artisan migrate --seed

    To run tests either run:

    ./vendor/bin/sail artisan test

    Or...

    php artisan test