⚙️ Configuration
The config file config/hwkui.php defines which JS/CSS plugins to load and whether to use CDN or local assets.
1. Publish the Config File
This will create config/hwkui.php.
🗂️ Using CDN (Default)
By default, hwkUI uses CDN links for plugins like jQuery, Select2, and DataTables.
Example from config/hwkui.php:
🗂️ Using Local Assets (Optional)
If you prefer to serve local assets (for offline use or better performance), follow these steps:
Step 1: Download Required JS/CSS Files
You must download the files manually:
Files to add manually
jQuery:
https://code.jquery.com/jquery-3.7.1.min.js
Select2:
https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css
https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js
Place them under public/vendor/hwkui/ or another folder of your choice.
Step 2: Update config/hwkui.php
Change asset => true and point to your local file path:
| hwkui.php | |
|---|---|
Laravel will generate the full asset URL using asset('vendor/hwkui/select2.min.css').
🗂️ Using NPM Assets (Optional)
If you prefer using npm packages, you can disable the plugins in the config file (set to false) and install the required packages:
These packages will be used for Datetime pickers, Select2, or TomSelect.
Then, in your app.js, import the packages: