The objective of this project is Create a project with Laravel 8 and Livewire where the following elements should be used. See Original requirements
Scope | Issues |
---|---|
|
Create environment local |
|
Sample Data |
|
Through a Jobs obtain salesOrdersTotal |
|
Show the data of the generated orders in the fe |
- GIT
- Docker
- Docker-compose or docker compose
(*) Validated in Linux based environments
bin/docker
{up | start | stop | allstop | restart | logs | removeproject}bin/composer
bin/artisan
mkdir -p ~/domains/challenge_bp
cd $_
git clone https://github.com/mmaximo33/challenge_bp ./
chmod +x bin/*
bin/docker up
Check the following urls
#App
http://localhost/
#Phpmyadmin
http://localhost:8080
You can create a custom domain by replacing mydomain.lcl from the following command
grep -qxF '127.0.0.1 mydomain.lcl' /etc/hosts || echo "127.0.0.1 mydomain.lcl" | sudo tee -a /etc/hosts
If I get to this point and you are viewing the Laravel screen, we have validated this requirement
You can see the available commands by running
bin/artisan list | egrep mm:
To validate this requirement we must do the following:
Custom mode
The following will happen
- Verify that the tables exist
- Otherwise there will be a risk of
artisan migration
.
- Otherwise there will be a risk of
- It will ask you for the amount of random data to create for
- Run the factories to
- Products
- Orders
- Order lines
- Run the factories to
- Create sample data
- It will return the result on the screen
# Load sample data
bin/artisan mm:data:example
# Clean
bin/artisan migrate:rollback
Simple mode
The following will happen
- Migrations will be loaded
- The factories are loaded with the values established in the requirement
# Load sample data
bin/artisan migrate --seed
# Clean
bin/artisan migrate
The next command available to continue performing the tasks.
- Dispatch a job which uses the Orders model to obtain the total sales made so far
bin/artisan mm:salesorders:total
The data generated in the previous tasks is displayed in the root url of the project
- General filter
- Items per page
- Pagination
- Sorted by fields