Installation
  • 02 Apr 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Installation

  • Dark
    Light

Article summary

Installation Guide

Copy Service Provider to Configuration

Add the following line to your config/app.php in the providers array

Stegback\RetailShop\RetailShopServiceProvider::class,

Run Migrations

Run the following commands to migrate the required tables:

php artisan migrate --path=vendor/stegback/retail_shop/src/database/2024_03_14_064153_create_stores_table.php
php artisan migrate --path=vendor/stegback/retail_shop/src/database/2024_03_14_101404_create_wallets_table.php
php artisan migrate --path=vendor/stegback/retail_shop/src/database/2024_03_15_093756_create_store_orders_table.php
php artisan migrate --path=vendor/stegback/retail_shop/src/database/2024_03_15_115359_create_store_products_table.php
php artisan migrate --path=vendor/stegback/retail_shop/src/database/2024_03_21_065702_create_store_histories_table.php

Configure Authentication Guards

Define auth guard in config/auth.php - Guards Array

Add the following configuration to the guards array in config/auth.php

'stores' => [
    'driver' => 'session',
    'provider' => 'stores',
],

Add the following configuration to the providers array in config/auth.php

'stores' => [
    'driver' => 'eloquent',
    'model' => \Stegback\RetailShop\Models\Store::class,
],

Publish Configuration Files

Run the following command to publish the configuration files and choose retailshop-config:

php artisan vendor:publish

Define Order and Product Model in Configuration File

 'OrderModel' => YourOrderModel::class,
 'ProductModel' => YourProductModel::class,


Was this article helpful?