ricadesign / laravel-ecommerce-data-model
Laravel migrations, models and Nova resources for the creation of an ecommerce site
v0.1.1
2021-05-26 22:39 UTC
Requires
- php: ^7.0
- ebess/advanced-nova-media-library: ^3.4
- laravel/framework: ^7.0 | ^8.0
- laravel/nova: ~3.0
- spatie/laravel-medialibrary: ^9.0.0
Requires (Dev)
- phpunit/phpunit: 10.0.x-dev
README
Laravel migrations, models and Nova resources for the creation of an ecommerce site
Installation
Begin by pulling in the package through Composer.
composer require ricadesign/laravel-ecommerce-data-model
Publishing everything
php artisan vendor:publish --tag=ricadesign/laravel-ecommerce-data-model
Add fields to create_features_table migration. Edit other migrations as needed before running them.
Using seeders
If needed, call the following seeders from your main seeder. Make sure to add the relationships below on your User model before doing so:
$this->call([ CategorySeeder::class, ProductSeeder::class, OrderSeeder::class, ]);
public function addresses() { return $this->hasMany(Address::class); } public function orders() { return $this->hasMany(Order::class); }