This is a Laravel project that provides a list of products and users. The admin user is admin@admin.com
and the password is password
. There are also 10 other users with the email addresses user-0@example.com
to user-9@example.com
and the password password
. You will also find a postman collection in /postman
so you can test all the APIs
To get started with this project, follow these steps:
- Clone the repository to your local machine:
git clone git@github.com:AkikiCharbel/DIM-assessment.git
- Install the project dependencies:
composer install
- Create a new
.env
file by copying the example file:cp .env.example .env
- Generate a new application key:
php artisan key:generate
- Configure your database connection in the
.env
file. By default, the.env.example
file is configured for Valet. If you're not using Valet, you'll need to update theAPP_URL
andDB_*
variables to match your environment. - Create the database and run the migrations:
php artisan migrate
- Seed the database with some sample data:
php artisan db:seed
This will seed the database with some sample products and users. The admin user will have the emailadmin@admin.com
and the passwordpassword
. There will be 10 other users with the email addressesuser-0@example.com
touser-9@example.com
and the passwordpassword
. - Start the development server:
php artisan serve
This will start the Laravel development server and make the application available athttp://localhost:8000
.
After following the steps above, you can access the application by visiting http://localhost:8000
in your web browser.
composer run phpstan
phpstan will check the code for errors
composer run pint
pint will fix the code indentation