Skip to content

Commit

Permalink
Add copyright text and link to config
Browse files Browse the repository at this point in the history
  • Loading branch information
maukoese committed Oct 13, 2024
1 parent 5f23624 commit 8e52b5b
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 52 deletions.
110 changes: 60 additions & 50 deletions config/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
| login page.
|
*/
'name' => 'Laravel-admin',
'name' => 'Laravel-admin',

/*
|--------------------------------------------------------------------------
Expand All @@ -22,7 +22,7 @@
| `img` tag, eg '<img src="http://logo-url" alt="Admin logo">'.
|
*/
'logo' => '<b>Laravel</b> admin',
'logo' => '<b>Laravel</b> admin',

/*
|--------------------------------------------------------------------------
Expand All @@ -34,7 +34,7 @@
| '<img src="http://logo-url" alt="Admin logo">'.
|
*/
'logo-mini' => '<b>La</b>',
'logo-mini' => '<b>La</b>',

/*
|--------------------------------------------------------------------------
Expand All @@ -44,7 +44,7 @@
| This value is the path of laravel-admin bootstrap file.
|
*/
'bootstrap' => app_path('Admin/bootstrap.php'),
'bootstrap' => app_path('Admin/bootstrap.php'),

/*
|--------------------------------------------------------------------------
Expand All @@ -56,11 +56,11 @@
| access through the root path, just set the prefix to empty string.
|
*/
'route' => [
'route' => [

'prefix' => env('ADMIN_ROUTE_PREFIX', 'admin'),
'prefix' => env('ADMIN_ROUTE_PREFIX', 'admin'),

'namespace' => 'App\\Admin\\Controllers',
'namespace' => 'App\\Admin\\Controllers',

'middleware' => ['web', 'admin'],
],
Expand All @@ -75,7 +75,7 @@
| be set before running `artisan admin::install` to take effect.
|
*/
'directory' => app_path('Admin'),
'directory' => app_path('Admin'),

/*
|--------------------------------------------------------------------------
Expand All @@ -85,7 +85,17 @@
| Html title for all pages.
|
*/
'title' => 'Admin',
'title' => 'Admin',

/**
* Show copyright text in footer
*
* Add link and text to display in footer
*/

'copyright_text' => env('ADMIN_COPYRIGHT_TEXT', 'Laravel-admin'),

'copyright_link' => env('ADMIN_COPYRIGHT_LINK', 'https://github.com/z-song/laravel-admin'),

/*
|--------------------------------------------------------------------------
Expand All @@ -95,7 +105,7 @@
| If your page is going to be accessed via https, set it to `true`.
|
*/
'https' => env('ADMIN_HTTPS', false),
'https' => env('ADMIN_HTTPS', false),

/*
|--------------------------------------------------------------------------
Expand All @@ -108,34 +118,34 @@
| You can specify a controller for `login` `logout` and other auth routes.
|
*/
'auth' => [
'auth' => [

'controller' => App\Admin\Controllers\AuthController::class,
'controller' => App\Admin\Controllers\AuthController::class,

'guard' => 'admin',
'guard' => 'admin',

'guards' => [
'guards' => [
'admin' => [
'driver' => 'session',
'provider' => 'admin',
],
],

'providers' => [
'providers' => [
'admin' => [
'driver' => 'eloquent',
'model' => Encore\Admin\Auth\Database\Administrator::class,
],
],

// Add "remember me" to login form
'remember' => true,
'remember' => true,

// Redirect to the specified URI when user is not authorized.
'redirect_to' => 'auth/login',

// The URIs that should be excluded from authorization.
'excepts' => [
'excepts' => [
'auth/login',
'auth/logout',
],
Expand All @@ -150,10 +160,10 @@
| disk and upload path.
|
*/
'upload' => [
'upload' => [

// Disk in `config/filesystem.php`.
'disk' => 'admin',
'disk' => 'admin',

// Image and file upload path under the disk above.
'directory' => [
Expand All @@ -170,26 +180,26 @@
| Here are database settings for laravel-admin builtin model & tables.
|
*/
'database' => [
'database' => [

// Database connection for following tables.
'connection' => '',
'connection' => '',

// User tables and model.
'users_table' => 'admin_users',
'users_model' => Encore\Admin\Auth\Database\Administrator::class,
'users_table' => 'admin_users',
'users_model' => Encore\Admin\Auth\Database\Administrator::class,

// Role table and model.
'roles_table' => 'admin_roles',
'roles_model' => Encore\Admin\Auth\Database\Role::class,
'roles_table' => 'admin_roles',
'roles_model' => Encore\Admin\Auth\Database\Role::class,

// Permission table and model.
'permissions_table' => 'admin_permissions',
'permissions_model' => Encore\Admin\Auth\Database\Permission::class,
'permissions_table' => 'admin_permissions',
'permissions_model' => Encore\Admin\Auth\Database\Permission::class,

// Menu table and model.
'menu_table' => 'admin_menu',
'menu_model' => Encore\Admin\Auth\Database\Menu::class,
'menu_table' => 'admin_menu',
'menu_model' => Encore\Admin\Auth\Database\Menu::class,

// Pivot table for table above.
'operation_log_table' => 'admin_operation_log',
Expand All @@ -207,9 +217,9 @@
| By setting this option to open or close operation log in laravel-admin.
|
*/
'operation_log' => [
'operation_log' => [

'enable' => true,
'enable' => true,

/*
* Only logging allowed methods in the list
Expand All @@ -222,8 +232,8 @@
* All method to path like: admin/auth/logs
* or specific method to path like: get:admin/auth/logs.
*/
'except' => [
env('ADMIN_ROUTE_PREFIX', 'admin').'/auth/logs*',
'except' => [
env('ADMIN_ROUTE_PREFIX', 'admin') . '/auth/logs*',
],
],

Expand All @@ -232,14 +242,14 @@
| Indicates whether to check route permission.
|--------------------------------------------------------------------------
*/
'check_route_permission' => true,
'check_route_permission' => true,

/*
|--------------------------------------------------------------------------
| Indicates whether to check menu roles.
|--------------------------------------------------------------------------
*/
'check_menu_roles' => true,
'check_menu_roles' => true,

/*
|--------------------------------------------------------------------------
Expand All @@ -249,7 +259,7 @@
| Set a default avatar for newly created users.
|
*/
'default_avatar' => '/vendor/laravel-admin/AdminLTE/dist/img/user2-160x160.jpg',
'default_avatar' => '/vendor/laravel-admin/AdminLTE/dist/img/user2-160x160.jpg',

/*
|--------------------------------------------------------------------------
Expand All @@ -259,7 +269,7 @@
| Supported: "tencent", "google", "yandex".
|
*/
'map_provider' => 'google',
'map_provider' => 'google',

/*
|--------------------------------------------------------------------------
Expand All @@ -275,7 +285,7 @@
| "skin-red", "skin-red-light", "skin-black", "skin-black-light".
|
*/
'skin' => env('ADMIN_SKIN', 'skin-blue-light'),
'skin' => env('ADMIN_SKIN', 'skin-blue-light'),

/*
|--------------------------------------------------------------------------
Expand All @@ -289,7 +299,7 @@
| "sidebar-mini".
|
*/
'layout' => ['sidebar-mini', 'sidebar-collapse'],
'layout' => ['sidebar-mini', 'sidebar-collapse'],

/*
|--------------------------------------------------------------------------
Expand All @@ -299,7 +309,7 @@
| This value is used to set the background image of login page.
|
*/
'login_background_image' => '',
'login_background_image' => '',

/*
|--------------------------------------------------------------------------
Expand All @@ -310,7 +320,7 @@
| each page
|
*/
'show_version' => true,
'show_version' => true,

/*
|--------------------------------------------------------------------------
Expand All @@ -320,7 +330,7 @@
| Whether to display the environment at the footer of each page
|
*/
'show_environment' => true,
'show_environment' => true,

/*
|--------------------------------------------------------------------------
Expand All @@ -329,7 +339,7 @@
|
| whether enable menu bind to a permission
*/
'menu_bind_permission' => true,
'menu_bind_permission' => true,

/*
|--------------------------------------------------------------------------
Expand All @@ -345,7 +355,7 @@
| Enable/Disable assets minify
|--------------------------------------------------------------------------
*/
'minify_assets' => [
'minify_assets' => [

// Assets will not be minified.
'excepts' => [
Expand All @@ -359,14 +369,14 @@
| Enable/Disable sidebar menu search
|--------------------------------------------------------------------------
*/
'enable_menu_search' => true,
'enable_menu_search' => true,

/*
|--------------------------------------------------------------------------
| Exclude route from generate menu command
|--------------------------------------------------------------------------
*/
'menu_exclude' => [
'menu_exclude' => [
'_handle_selectable_',
'_handle_renderable_',
],
Expand All @@ -376,14 +386,14 @@
| Alert message that will displayed on top of the page.
|--------------------------------------------------------------------------
*/
'top_alert' => '',
'top_alert' => '',

/*
|--------------------------------------------------------------------------
| The global Grid action display class.
|--------------------------------------------------------------------------
*/
'grid_action_class' => \Encore\Admin\Grid\Displayers\DropdownActions::class,
'grid_action_class' => \Encore\Admin\Grid\Displayers\DropdownActions::class,

/*
|--------------------------------------------------------------------------
Expand All @@ -393,7 +403,7 @@
| When you use command `php artisan admin:extend` to generate extensions,
| the extension files will be generated in this directory.
*/
'extension_dir' => app_path('Admin/Extensions'),
'extension_dir' => app_path('Admin/Extensions'),

/*
|--------------------------------------------------------------------------
Expand All @@ -404,7 +414,7 @@
| https://github.com/laravel-admin-extensions.
|
*/
'extensions' => [
'extensions' => [

],
];
9 changes: 7 additions & 2 deletions resources/views/partials/footer.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- To the right -->
<div class="pull-right hidden-xs">
@if(config('admin.show_environment'))
<strong>Env</strong>&nbsp;&nbsp; {!! config('app.env') !!}
<strong>Env</strong>&nbsp;&nbsp; {!! config('app.env') !!}
@endif

&nbsp;&nbsp;&nbsp;&nbsp;
Expand All @@ -14,5 +14,10 @@

</div>
<!-- Default to the left -->

@if(config('admin.copyright_link'))
<strong>Powered by <a href="{{config('admin.copyright_link')}}" target="_blank">{{config('admin.copyright_text')}}</a></strong>
@else
<strong>Powered by <a href="https://github.com/z-song/laravel-admin" target="_blank">laravel-admin</a></strong>
</footer>
@endif
</footer>

0 comments on commit 8e52b5b

Please sign in to comment.