This package will easily provide you with all the defaults of a new laravel-backpack installation you need to change in order to brand your backend.
Via Composer
$ composer require zoutapps/laravel-backpack-branding
Just type the following command in your console.
$ php artisan za:brand
This will ask you for all the values you can set.
You can store your global defaults as as json
file if you don't want to enter them on each setup.
We will still ask you for any value we can set that is not provided in the json
file.
Furthermore you can also define values we currently don't ask for and add/replace them.
To apply your global defaults just use
$ php artisan za:brand path/to/your/default.json
- beneath the
env
-key you can specify values to add/replace in your.env
file. - the
config
objects contains the config-file keys that should be touched. We currently only support thebackpack_base
key to specify values that should be replaced in yourconfig/backpack/base.php
- next is the
copy
array where you define ann array of objects withsrc
anddest
. For each object all files and folders under the src path (relative to the default.json) will be copied to the dest-path (relative to your project root). - last is the
branding
object that defines values for theBranding
facade.
Sample defaults.json
file:
{
"env": {
"BACKPACK_LICENSE": "YOUR_BACKPACK_LICENCE_KEY",
"BACKPACK_REGISTRATION_OPEN": false
},
"config": {
"backpack_base": {
"project_name": "Your Project Name",
"logo_lg": "<b>Back</b>pack",
"logo_mini": "<b>B</b>p",
"developer_name": "Oliver Ziegler",
"developer_link": "https://zoutapps.de",
"show_powered_by": true,
"skin": "skin-blue",
"default_date_format": "d.m.Y",
"default_datetime_format": "d.m.Y H:i",
"route_prefix": "admin"
}
},
"copy": [
{
"src": "public/vendor",
"dest": "public/vendor"
}
],
"branding": {
"asset": {
"logo": "public/vendor/logo.png",
"banner": "public/vendor/banner.png"
},
"url": "https://github/zoutapps",
"developer": "Zout Apps"
}
}
We provide a Branding
facade to conveniently access some of your branding values.
Currently implemented are:
Branding::asset($key)
: will return the asset url of the file (eg.Branding::asset('logo')
)Branding::link($content = null, $class = null, $target = null)
: will return an html<a>
tag with specified values or convenient defaults.Branding::developer()
: returns the developer name specifiedBranding::url()
: returns the url specified
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email oliver.ziegler@zoutapps.de instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.