The control panel may be customized in a number of different ways. You may add new pages, menus, a stylesheet, or maybe you just want to add some arbitrary Javascript. When you need to add features to your Shopper administration, you can first set up some configurationsDocumentation Index
Fetch the complete documentation index at: https://docs.laravelshopper.dev/llms.txt
Use this file to discover all available pages before exploring further.
Adding CSS and JS assets
Shopper can load extra stylesheets and Javascript files located in thepublic/ directory.
You may register assets to be loaded in the Control Panel using the scripts and stylesheets keys of the resources in the config/shopper/admin.php config file. This will accept a array of links.
You can load the links locally or using cdn. They will be automatically loaded in the control panel
Depending on how you will use your css and js files, the order is important
public/css/admin.css and public/js/admin.js respectively for local links.
Customize Shopper theme
Shopper is built using Tallstack presets, but you are not limited to that because the base css file is already built for production. But if you want to customize your dashboard using Tailwind css you must first install Tailwind in your project. You can read the documentation Shopper using Tailwind CSS, there are some Tailwind plugins you need to install first: Plugin Forms and Typography, Autoprefixer. You can install them via NPM or Yarn:tailwind.config.js file at the root of your project and add this content
Laravel Mix and in your webpack.mix.js file, register Tailwind CSS as a PostCSS plugin:
./resources/css/admin.css
yarn run dev
And add Tailwind to the postcss.config.js file:
Branding Logo
After update (or not) the colors of your administration theme to reflect your brand. You’ll probably want to change the logo to display By default, Shopper logo is used next to your application name in the administration panel. You can choose between 2 options The first, and simplest, is to modify the value of thebrand key in your shopper/admin.php configuration file, by entering the link to your logo.
asset() helper function.
The 2nd option is to create a resources/views/vendor/shopper/components/brand.blade.php file to provide a customized logo:
It can be a simple svg or an image tag.
Adding control panel routes
If you need to have custom routes for the control panel:-
Create a routes file. Name it whatever you want, for example:
routes/shopper.php -
Then add this to your
shopper/routes.phpfile so that all routes are dynamically loaded: -
If you want to add middleware to further control access to the routes available in this file you can add in the key
middlewareof theshopper/routes.phpfile