A website for creating and sharing wishlists with family and friends
Clone the project
git clone git@github.com:angus-websites/wish4it.git
Go to the project directory
cd wish4it
Setup Laravel Sail
NOTE: Ensure you have Docker installed
docker run --rm \
-u "$(id -u):$(id -g)" \
-v $(pwd):/var/www/html \
-w /var/www/html \
laravelsail/php81-composer:latest \
composer install --ignore-platform-reqs
Generate a .env file using the example provided
cp .env.example .env
Run Laravel Sail (Development server)
./vendor/bin/sail up
Open a new Terminal tab in the same project root folder
Generate an app encryption key
./vendor/bin/sail php artisan key:generate
Migrate the database
./vendor/bin/sail php artisan migrate
Run Vite (frontend)
./vendor/bin/sail npm run dev
Visit Localhost
Variables in the .env
file can be customised...
Variable Name | Purpose | Accepted Values | Default Value |
---|---|---|---|
ADMIN_NAME | Name of the admin user | String | - |
ADMIN_EMAIL | Email of the admin user | String | - |
ADMIN_PASSWORD | Password for the admin user | String | - |
Tests are located in the tests
folder and are split into two sections...
Feature tests, also known as end-to-end tests, simulate user interactions with our application. These tests cover scenarios from a user's perspective and ensure that different parts of the application work together correctly.
Unit testing is a fundamental practice in software development aimed at testing individual units or components of code in isolation. Each unit test focuses on a specific function, method, or class and verifies that it behaves as expected. The goal is to detect and fix bugs early in the development process, leading to more reliable and maintainable code.
Tests can be run using the following command...
./vendor/bin/sail php artisan test
./vendor/bin/sail php artisan test --configuration=phpunit.performance.xml
When updating certain fields in the .env
file when using Laravel Sail, you may need to restart the Docker container for changes to take affect.