This is the back-end of my Blogify project, it uses Laravel as a REST API. It is still a work in progress...
You will need to have Docker/Docker Desktop installed or Composer and PHP to run this API.
To start the project, follow these steps:
- Set up environment by copying the example environment file:
- Install all dependencies:
- Run the migrations and seed the database:
- Spin up docker containers:
- Run the migrations and seed the database:
cp .env.example .env
composer install
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
./vendor/bin/sail up
./vendor/bin/sail artisan migrate --seed
To run tests either run:
./vendor/bin/sail artisan test
Or...
php artisan test