Ensure you have the following software installed on your machine:
- PHP (version 7.4 or higher)
- Composer (latest version)
- Node.js and npm (latest version)
- MySQL (or any other database you are using)
- Git (for version control)
Use Composer to install the required PHP dependencies.
composer install
Copy the .env.example
file to .env
and configure your environment variables. Make sure to set up your database credentials and other necessary configurations.
cp .env.example .env
Edit the .env
file to match your environment settings.
Generate the application key using the following command:
php artisan key:generate
Use npm to install the required Node.js dependencies.
npm install
Compile the assets using the following command:
npm run dev
Run the database migrations to set up your database schema.
php artisan migrate
run seeders to populate the database with initial data.
php artisan db:seed
Finally, start the development server.
php artisan serve
Open your browser and navigate to http://localhost:8000
to see the application running.
Ensure PHPUnit is installed. If it's not installed globally, you can add it to your project via Composer.
composer require --dev phpunit/phpunit
Execute the PHP tests using the following command:
./vendor/bin/phpunit
This will run all the tests located in the tests
directory.