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 installCopy 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 .envEdit the .env file to match your environment settings.
Generate the application key using the following command:
php artisan key:generateUse npm to install the required Node.js dependencies.
npm installCompile the assets using the following command:
npm run devRun the database migrations to set up your database schema.
php artisan migraterun seeders to populate the database with initial data.
php artisan db:seedFinally, start the development server.
php artisan serveOpen 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/phpunitExecute the PHP tests using the following command:
./vendor/bin/phpunitThis will run all the tests located in the tests directory.