A simple e-commerce project example made with Laravel 5.8 and Vue.js 2
Clone this repository to a folder in your documents
git clone https://github.com/iagoqueiroz/vue-commerce.git && cd vue-commerce
Installing dependences
composer install
npm install
Copy the .env.example
into .env
and configure a database of your choice and set the variables in .env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=vuecommerce
DB_USERNAME=root
DB_PASSWORD=secret
Create a symbolic link of the storage folder
php artisan storage:link
Generate the JWT secret that will be used to encrypt the application token
php artisan jwt:secret
Execute the migrations and seed the database
php artisan migrate --seed
Run the local server and access the url of the project http://localhost:8000
php artisan serve --host=localhost --port=8000
To import a new product, you need a .csv
file with the structure above:
name | category | price |
---|---|---|
Product 1 | New Category | 500,20 |
Product 2 | Eletronics | 1200,00 |
Product 3 | Smartphones | 999,90 |
Then you can access the application as a admin user to import the file on the Products page
Imported products need to be handled by the scheduled job
php artisan schedule:run
You can put this on a cronjob
Admin User
email: [email protected]
password: admin
Normal User
email: [email protected]
password: user
If you want to check all the tests, just run:
composer test