Skip to content

an4xdev/online-shop

Repository files navigation

Online shop project

TODO if I ever want to come back

  • Modals
  • Buy again button implementation
  • Controller separations and refactoring

Project

Project created to learn and practise Laravel.

Used

Requirements

  • Laravel - 11.9
  • BladewindUI - 2.6
  • Node.js - v22.4.0
  • Python - for custom data seeding

User types

Type Email Password
Administrator admin@example.com password
Seller s[1,2,3,4,5,6]@example.com password
User u[1,2,3,4,5,6]@example.com password

see DatabaseSeeder.

Custom data seeding

In data.py is structure:

products = [
    {
        "category": {
            "sub-category": ["name of subacategory in singular form if necessary", 
            "suffix like: l(liters) or kg(kilograms) or ...",
            ("company", "company", "company", ...)],
            ...
        }
    },
    ...
]

product name is" sub-category (element[0]) + company (one of element[2]) + unit (element[1]).

In main.py you can modify constants.

Run main.py and generated file data.sql move to /database/seeds.

Run migrations:

> php artisan migrate

Seed database:

> php artisan db:seed

Start project

Use batch script

With migrations and data seeding

> run.bat -mds

Without migrations and data seeding

> run.bat

Run separately

Run laravel

> php artisan serve

Install js dependencies

> npm install

Run node.js

> npm run dev

Run migrations

> php artisan migrate

Seed database

> php artisan db:seed

About

Projekt stworzony do nauki framework'a Laravel

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published