Supported Versions of Laravel
Laravel 11+ are supported. It feels like this section needs more than one sentence but it really doesn’t. That first one said all that needs saying.Install Shopper
Shopper is really easy to install. After creating your new app or in an existing Laravel app (11+). There are 2 steps to follow to install Shopper.- Clear to cached config by running the following command:
- Install
shopper/frameworkpackage with Composer from your project root.
Prepare your User Model
Shopper relies on yourUser model having certain relationships and methods set up to handle authentication,
permissions, and admin panel access. Rather than asking you to manually add all of these, we’ve bundled
them into a trait and an interface for convenience.
Add the ShopperUser trait and implement the ShopperUser interface to your User model (usually app/Models/User.php):
app/Models/User.php
The trait provides essential relationships for roles, permissions, and two-factor authentication.
The interface ensures your model adheres to the contract expected by Shopper’s core features.
By default, all shopper tables are prefixed with
sh_ to avoid conflicts with existing tables in your database.
But you can update this configuration according to your needCreate an Admin user
Now we can create a new superuser and sign in into the Dashboard and start creating some content. Run the following command to create a user with supreme (at the moment of creation) rights:New Shopper Directory
After Shopper is installed, you’ll have 1 new directory in your project:config/shopper/
Publish Vendor Files
If you want to publish again Shopper’s vendor files run these commands:Running Your Application
To run your application locally, you can use Laravel’s built-in development server:http://localhost:8000/cpanel/login to access the admin panel.
If you’re using Laravel Herd or Laravel Valet, you can access your application directly using the .test domain: