config/shopper/.
Shopper is a build components blocks, and by default all configuration files are not published and will be published in a components folder inside the Shopper configuration folder.
Here’s the list of configuration files that are published during installation
Control Panel
By default, when you install the package, the dashboard is accessible via the prefix/cpanel.
You can update this configuration in the admin.php file, or you can add the SHOPPER_PREFIX variable to your .env environment file.
config/shopper/admin.php
SHOPPER_DOMAIN variable to your environment file.
This config will use Laravel Route::domain() function
Database tables prefix
During installation, all tables are prefixed withsh_ so that they don’t conflict with existing tables in your application database.
If you change this prefix after installation, you’ll need to refresh migration for the configuration to take effect.
config/shopper/core.php
php artisan migrate:refresh
Re-run the Shopper Database table seeder: php artisan db:seed --class=\Shopper\Core\Database\Seeders\ShopperSeeder
Models
Models used are defined in the models configshopper/models.php file, if you want to use your own models you can replace them on this file.
Added Middleware
Shopper gives you the ability to add extra middlewares. All these middlewares will be applied to authenticated routesconfig/shopper/routes.php
Additional dashboard routes
By default, none of your routes in theweb.php file will be accessible and loaded in the shopper administration.
Routes added in the sidebar have the middleware applied to the dashboard, you must fill in an additional routing file and this will be automatically loaded by Shopper
config/shopper/routes.php
Components
The main features of Shopper is to handle Livewire components to add new functionalities to your admin panel. For this purpose you have components files that lists each Livewire components used within Laravel Shopper. You can extend component to add functionality and even change the view to fit your own logic. Here is a list of components files available. All these files can be published withphp artisan shopper:component:publish
Settings
Settings are a very important part of an e-commerce site administration. Shopper uses a class-based approach for settings, allowing you to easily add, remove or disable settings pages. Each setting is a class that implements theShopper\Contracts\SettingItem interface. The configuration file settings.php registers which settings are enabled or disabled.
config/shopper/settings.php
false.
Creating a custom setting
To create your own setting page, extend theShopper\Settings\Setting base class:
settings.php config file:
Programmatic registration
You can also register settings programmatically via theSettingManager: