Vendor Files
Platform Routes
All platform specific routes are stored inside the routes
directory of the varbox
package, so if you want to have a clear overview on what we expose, take a look in that directory.
The routes are automatically registered at service provider level, so you don't have to do anything regarding this.
One important thing to note here is to have the following at the very end of your routes/web.php
file.
This is a route macro that dispatches your custom urls to their appropriate controller & method.
Route::varbox();
Config Files
All of the configuration files are stored in the config/varbox
directory.
You are strongly encouraged to read the comments inside those config files, as they provide useful insight on how to use the respective functionalities.
Publish Configs
All config files were automatically published when you ran:
php artisan varbox:install
If you didn't run the above command, you can publish your config files by running:
php artisan vendor:publish --tag=varbox-config
Important Note
Re-publishing the config files after you've already modified them, won't overwrite your changes.
Blade Views
All view files are stored in the resources/views/vendor/varbox
directory. This directory contains all blade views used for the admin panel.
You are free to modify any of these views to match your needs.
The platform uses Bootstrap 4 so it should be fairly easy to modify the views.
Publish Views
The view files were automatically published when you ran:
php artisan varbox:install
If you didn't run the above command, you can publish your view files, by running:
php artisan vendor:publish --tag=varbox-views
Important Note
Re-publishing the view files after you've already modified them, won't overwrite your changes.
Public Assets
All of the asset files are stored in the public/vendor/varbox
directory.
If you're using a vcs tool you should NOT ignore this directory.
All assets published by the platform are only used for styling the admin panel. You're not required to include any platform related css or javascript in your frontend.
The asset files are already compiled using Laravel Mix.
Publish Assets
All assets were automatically published when you ran:
php artisan varbox:install
If you didn't run the above command, you can publish your assets, by running:
php artisan vendor:publish --tag=varbox-public
Important Note
If you wish to overwrite frontend behavior for the admin panel, please create your own files.
You can then include your css or js custom files inside:
resources/views/vendor/varbox/layouts/admin/partials/_head.blade.php
resources/views/vendor/varbox/layouts/admin/partials/_footer.blade.php
Migration & Seeds
In order not to crowd your database/migrations
directory, only one _create_varbox_tables.php
migration file is published, responsible for creating all necessary tables.
You should check that migration file and make sure you don't already use tables with the same name in your application.
Publish Migration
The migration file was automatically published when you ran:
php artisan varbox:install
If you didn't run the above command, you can publish your migration file, by running:
php artisan vendor:publish --tag=varbox-migrations
The Seeders
In addition to the migration file, a few database seeders are are also published for you out of the box.
No seeder will tamper with your already existing data, because a check is automatically performed to see if the record already exists before creating it.
You can run all Varbox seeders with one command:
php artisan db:seed --class="VarboxSeeder"
Or individually, if you don't need all the data:
// create all crud permissions
php artisan db:seed --class="PermissionsSeeder"
// create admin & super roles
php artisan db:seed --class="RolesSeeder"
// create the initial admin user
php artisan db:seed --class="UsersSeeder"
// create all known languages
php artisan db:seed --class="LanguagesSeeder"
// create all known countries
php artisan db:seed --class="CountriesSeeder"
// create most known states
php artisan db:seed --class="StatesSeeder"
// create most known cities
php artisan db:seed --class="CitiesSeeder"