first commit
This commit is contained in:
194
config/backpack/base.php
Normal file
194
config/backpack/base.php
Normal file
@ -0,0 +1,194 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Registration Open
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Choose whether new users/admins are allowed to register.
|
||||
| This will show the Register button on the login page and allow access to the
|
||||
| Register functions in AuthController.
|
||||
|
|
||||
| By default the registration is open only on localhost.
|
||||
*/
|
||||
|
||||
'registration_open' => false, //env('BACKPACK_REGISTRATION_OPEN', env('APP_ENV') === 'local'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Routing
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// The prefix used in all base routes (the 'admin' in admin/dashboard)
|
||||
// You can make sure all your URLs use this prefix by using the backpack_url() helper instead of url()
|
||||
'route_prefix' => 'admin',
|
||||
|
||||
// The web middleware (group) used in all base & CRUD routes
|
||||
// If you've modified your "web" middleware group (ex: removed sessions), you can use a different
|
||||
// route group, that has all the the middleware listed below in the comments.
|
||||
'web_middleware' => 'web',
|
||||
// Or you can comment the above, and uncomment the complete list below.
|
||||
// 'web_middleware' => [
|
||||
// \App\Http\Middleware\EncryptCookies::class,
|
||||
// \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||
// \Illuminate\Session\Middleware\StartSession::class,
|
||||
// \Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||
// \App\Http\Middleware\VerifyCsrfToken::class,
|
||||
// ],
|
||||
|
||||
// Set this to false if you would like to use your own AuthController and PasswordController
|
||||
// (you then need to setup your auth routes manually in your routes.php file)
|
||||
// Warning: if you disable this, the password recovery routes (below) will be disabled too!
|
||||
'setup_auth_routes' => true,
|
||||
|
||||
// Set this to false if you would like to skip adding the dashboard routes
|
||||
// (you then need to overwrite the login route on your AuthController)
|
||||
'setup_dashboard_routes' => true,
|
||||
|
||||
// Set this to false if you would like to skip adding "my account" routes
|
||||
// (you then need to manually define the routes in your web.php)
|
||||
'setup_my_account_routes' => true,
|
||||
|
||||
// Set this to false if you would like to skip adding the password recovery routes
|
||||
// (you then need to manually define the routes in your web.php)
|
||||
'setup_password_recovery_routes' => false,
|
||||
|
||||
// Set this to true if you would like to enable email verification for your user model.
|
||||
// Make sure your user model implements the MustVerifyEmail contract and your database
|
||||
// table contains the `email_verified_at` column. Read the following before enabling:
|
||||
// https://backpackforlaravel.com/docs/6.x/base-how-to#enable-email-verification-in-backpack-routes
|
||||
'setup_email_verification_routes' => false,
|
||||
|
||||
// When email verification is enabled, automatically add the Verified middleware to Backpack routes?
|
||||
// Set false if you want to use your own Verified middleware in `middleware_class`.
|
||||
'setup_email_verification_middleware' => true,
|
||||
|
||||
// How many times in any given time period should the user be allowed to
|
||||
// request a new verification email?
|
||||
// Defaults to 1,10 - 1 time in 10 minutes.
|
||||
'email_verification_throttle_access' => '3,15',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Security
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// Backpack will prevent visitors from requesting password recovery too many times
|
||||
// for a certain email, to make sure they cannot be spammed that way.
|
||||
// How many seconds should a visitor wait, after they've requested a
|
||||
// password reset, before they can try again for the same email?
|
||||
'password_recovery_throttle_notifications' => 600, // time in seconds
|
||||
|
||||
// How much time should the token sent to the user email be considered valid?
|
||||
// After this time expires, user needs to request a new reset token.
|
||||
'password_recovery_token_expiration' => 60, // time in minutes
|
||||
|
||||
// Backpack will prevent an IP from trying to reset the password too many times,
|
||||
// so that a malicious actor cannot try too many emails, too see if they have
|
||||
// accounts or to increase the AWS/SendGrid/etc bill.
|
||||
//
|
||||
// How many times in any given time period should the user be allowed to
|
||||
// attempt a password reset? Take into account that user might wrongly
|
||||
// type an email at first, so at least allow one more try.
|
||||
// Defaults to 3,10 - 3 times in 10 minutes.
|
||||
'password_recovery_throttle_access' => '3,10',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// Fully qualified namespace of the User model
|
||||
'user_model_fqn' => config('auth.providers.users.model'),
|
||||
// 'user_model_fqn' => App\User::class, // works on Laravel <= 7
|
||||
// 'user_model_fqn' => App\Models\User::class, // works on Laravel >= 8
|
||||
|
||||
// The classes for the middleware to check if the visitor is an admin
|
||||
// Can be a single class or an array of classes
|
||||
'middleware_class' => [
|
||||
App\Http\Middleware\CheckIfAdmin::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
||||
\Backpack\CRUD\app\Http\Middleware\AuthenticateSession::class,
|
||||
// \Backpack\CRUD\app\Http\Middleware\UseBackpackAuthGuardInsteadOfDefaultAuthGuard::class,
|
||||
],
|
||||
|
||||
// Alias for that middleware
|
||||
'middleware_key' => 'admin',
|
||||
// Note: It's recommended to use the backpack_middleware() helper everywhere, which pulls this key for you.
|
||||
|
||||
// Username column for authentication
|
||||
// The Backpack default is the same as the Laravel default (email)
|
||||
// If you need to switch to username, you also need to create that column in your db
|
||||
'authentication_column' => 'email',
|
||||
'authentication_column_name' => 'Email',
|
||||
|
||||
// Backpack assumes that your "database email column" for operations like Login and Register is called "email".
|
||||
// If your database email column have a different name, you can configure it here. Eg: `user_mail`
|
||||
'email_column' => 'email',
|
||||
|
||||
// The guard that protects the Backpack admin panel.
|
||||
// If null, the config.auth.defaults.guard value will be used.
|
||||
'guard' => 'backpack',
|
||||
|
||||
// The password reset configuration for Backpack.
|
||||
// If null, the config.auth.defaults.passwords value will be used.
|
||||
'passwords' => 'backpack',
|
||||
|
||||
// What kind of avatar will you like to show to the user?
|
||||
// Default: gravatar (automatically use the gravatar for their email)
|
||||
// Other options:
|
||||
// - null (generic image with their first letter)
|
||||
// - example_method_name (specify the method on the User model that returns the URL)
|
||||
'avatar_type' => 'gravatar',
|
||||
|
||||
// Gravatar fallback options are 'identicon', 'monsterid', 'wavatar', 'retro', 'robohash', 'blank'
|
||||
// 'blank' will keep the generic image with the user first letter
|
||||
'gravatar_fallback' => 'blank',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| File System
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// Backpack\Base sets up its own filesystem disk, just like you would by
|
||||
// adding an entry to your config/filesystems.php. It points to the root
|
||||
// of your project and it's used throughout all Backpack packages.
|
||||
//
|
||||
// You can rename this disk here. Default: root
|
||||
'root_disk_name' => 'root',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// Should we use DB transactions when executing multiple queries? For example when creating an entry and it's relationships.
|
||||
// By wrapping in a database transaction you ensure that either all queries went ok, or if some failed the whole process
|
||||
// is rolled back and considered failed. This is a good setting for data integrity.
|
||||
'useDatabaseTransactions' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Backpack Token Username
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you have access to closed-source Backpack add-ons, please provide
|
||||
| your token username here, if you're getting yellow alerts on your
|
||||
| admin panel's pages. Normally this is not needed, it is
|
||||
| preferred to add this as an environment variable
|
||||
| (most likely in your .env file).
|
||||
|
|
||||
| More info and payment form on:
|
||||
| https://www.backpackforlaravel.com
|
||||
|
|
||||
*/
|
||||
|
||||
'token_username' => env('BACKPACK_TOKEN_USERNAME', false),
|
||||
];
|
480
config/backpack/crud.php
Normal file
480
config/backpack/crud.php
Normal file
@ -0,0 +1,480 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Backpack\CRUD preferences.
|
||||
*/
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|-------------------
|
||||
| TRANSLATABLE CRUDS
|
||||
|-------------------
|
||||
*/
|
||||
|
||||
'show_translatable_field_icon' => true,
|
||||
'translatable_field_icon_position' => 'right', // left or right
|
||||
|
||||
'locales' => [
|
||||
// "af_NA" => "Afrikaans (Namibia)",
|
||||
// "af_ZA" => "Afrikaans (South Africa)",
|
||||
// "af" => "Afrikaans",
|
||||
// "ak_GH" => "Akan (Ghana)",
|
||||
// "ak" => "Akan",
|
||||
// "sq_AL" => "Albanian (Albania)",
|
||||
// "sq" => "Albanian",
|
||||
// "am_ET" => "Amharic (Ethiopia)",
|
||||
// "am" => "Amharic",
|
||||
// "ar_DZ" => "Arabic (Algeria)",
|
||||
// "ar_BH" => "Arabic (Bahrain)",
|
||||
// "ar_EG" => "Arabic (Egypt)",
|
||||
// "ar_IQ" => "Arabic (Iraq)",
|
||||
// "ar_JO" => "Arabic (Jordan)",
|
||||
// "ar_KW" => "Arabic (Kuwait)",
|
||||
// "ar_LB" => "Arabic (Lebanon)",
|
||||
// "ar_LY" => "Arabic (Libya)",
|
||||
// "ar_MA" => "Arabic (Morocco)",
|
||||
// "ar_OM" => "Arabic (Oman)",
|
||||
// "ar_QA" => "Arabic (Qatar)",
|
||||
// "ar_SA" => "Arabic (Saudi Arabia)",
|
||||
// "ar_SD" => "Arabic (Sudan)",
|
||||
// "ar_SY" => "Arabic (Syria)",
|
||||
// "ar_TN" => "Arabic (Tunisia)",
|
||||
// "ar_AE" => "Arabic (United Arab Emirates)",
|
||||
// "ar_YE" => "Arabic (Yemen)",
|
||||
// "ar" => "Arabic",
|
||||
// "hy_AM" => "Armenian (Armenia)",
|
||||
// "hy" => "Armenian",
|
||||
// "as_IN" => "Assamese (India)",
|
||||
// "as" => "Assamese",
|
||||
// "asa_TZ" => "Asu (Tanzania)",
|
||||
// "asa" => "Asu",
|
||||
// "az_Cyrl" => "Azerbaijani (Cyrillic)",
|
||||
// "az_Cyrl_AZ" => "Azerbaijani (Cyrillic, Azerbaijan)",
|
||||
// "az_Latn" => "Azerbaijani (Latin)",
|
||||
// "az_Latn_AZ" => "Azerbaijani (Latin, Azerbaijan)",
|
||||
// "az" => "Azerbaijani",
|
||||
// "bm_ML" => "Bambara (Mali)",
|
||||
// "bm" => "Bambara",
|
||||
// "eu_ES" => "Basque (Spain)",
|
||||
// "eu" => "Basque",
|
||||
// "be_BY" => "Belarusian (Belarus)",
|
||||
// "be" => "Belarusian",
|
||||
// "bem_ZM" => "Bemba (Zambia)",
|
||||
// "bem" => "Bemba",
|
||||
// "bez_TZ" => "Bena (Tanzania)",
|
||||
// "bez" => "Bena",
|
||||
// "bn_BD" => "Bengali (Bangladesh)",
|
||||
// "bn_IN" => "Bengali (India)",
|
||||
// "bn" => "Bengali",
|
||||
// "bs_BA" => "Bosnian (Bosnia and Herzegovina)",
|
||||
// "bs" => "Bosnian",
|
||||
// "bg_BG" => "Bulgarian (Bulgaria)",
|
||||
// "bg" => "Bulgarian",
|
||||
// "my_MM" => "Burmese (Myanmar [Burma])",
|
||||
// "my" => "Burmese",
|
||||
// "ca_ES" => "Catalan (Spain)",
|
||||
// "ca" => "Catalan",
|
||||
// "tzm_Latn" => "Central Morocco Tamazight (Latin)",
|
||||
// "tzm_Latn_MA" => "Central Morocco Tamazight (Latin, Morocco)",
|
||||
// "tzm" => "Central Morocco Tamazight",
|
||||
// "chr_US" => "Cherokee (United States)",
|
||||
// "chr" => "Cherokee",
|
||||
// "cgg_UG" => "Chiga (Uganda)",
|
||||
// "cgg" => "Chiga",
|
||||
// "zh_Hans" => "Chinese (Simplified Han)",
|
||||
// "zh_Hans_CN" => "Chinese (Simplified Han, China)",
|
||||
// "zh_Hans_HK" => "Chinese (Simplified Han, Hong Kong SAR China)",
|
||||
// "zh_Hans_MO" => "Chinese (Simplified Han, Macau SAR China)",
|
||||
// "zh_Hans_SG" => "Chinese (Simplified Han, Singapore)",
|
||||
// "zh_Hant" => "Chinese (Traditional Han)",
|
||||
// "zh_Hant_HK" => "Chinese (Traditional Han, Hong Kong SAR China)",
|
||||
// "zh_Hant_MO" => "Chinese (Traditional Han, Macau SAR China)",
|
||||
"zh_Hant_TW" => "Chinese (Traditional Han, Taiwan)",
|
||||
// "zh" => "Chinese",
|
||||
// "kw_GB" => "Cornish (United Kingdom)",
|
||||
// "kw" => "Cornish",
|
||||
// "hr_HR" => "Croatian (Croatia)",
|
||||
// "hr" => "Croatian",
|
||||
// "cs_CZ" => "Czech (Czech Republic)",
|
||||
// "cs" => "Czech",
|
||||
// "da_DK" => "Danish (Denmark)",
|
||||
// "da" => "Danish",
|
||||
// "nl_BE" => "Dutch (Belgium)",
|
||||
// "nl_NL" => "Dutch (Netherlands)",
|
||||
// "nl" => "Dutch",
|
||||
// "ebu_KE" => "Embu (Kenya)",
|
||||
// "ebu" => "Embu",
|
||||
// "en_AS" => "English (American Samoa)",
|
||||
// "en_AU" => "English (Australia)",
|
||||
// "en_BE" => "English (Belgium)",
|
||||
// "en_BZ" => "English (Belize)",
|
||||
// "en_BW" => "English (Botswana)",
|
||||
// "en_CA" => "English (Canada)",
|
||||
// "en_GU" => "English (Guam)",
|
||||
// "en_HK" => "English (Hong Kong SAR China)",
|
||||
// "en_IN" => "English (India)",
|
||||
// "en_IE" => "English (Ireland)",
|
||||
// "en_JM" => "English (Jamaica)",
|
||||
// "en_MT" => "English (Malta)",
|
||||
// "en_MH" => "English (Marshall Islands)",
|
||||
// "en_MU" => "English (Mauritius)",
|
||||
// "en_NA" => "English (Namibia)",
|
||||
// "en_NZ" => "English (New Zealand)",
|
||||
// "en_MP" => "English (Northern Mariana Islands)",
|
||||
// "en_PK" => "English (Pakistan)",
|
||||
// "en_PH" => "English (Philippines)",
|
||||
// "en_SG" => "English (Singapore)",
|
||||
// "en_ZA" => "English (South Africa)",
|
||||
// "en_TT" => "English (Trinidad and Tobago)",
|
||||
// "en_UM" => "English (U.S. Minor Outlying Islands)",
|
||||
// "en_VI" => "English (U.S. Virgin Islands)",
|
||||
// "en_GB" => "English (United Kingdom)",
|
||||
// "en_US" => "English (United States)",
|
||||
// "en_ZW" => "English (Zimbabwe)",
|
||||
//'en' => 'English',
|
||||
// "eo" => "Esperanto",
|
||||
// "et_EE" => "Estonian (Estonia)",
|
||||
// "et" => "Estonian",
|
||||
// "ee_GH" => "Ewe (Ghana)",
|
||||
// "ee_TG" => "Ewe (Togo)",
|
||||
// "ee" => "Ewe",
|
||||
// "fo_FO" => "Faroese (Faroe Islands)",
|
||||
// "fo" => "Faroese",
|
||||
// "fil_PH" => "Filipino (Philippines)",
|
||||
// "fil" => "Filipino",
|
||||
// "fi_FI" => "Finnish (Finland)",
|
||||
// "fi" => "Finnish",
|
||||
// "fr_BE" => "French (Belgium)",
|
||||
// "fr_BJ" => "French (Benin)",
|
||||
// "fr_BF" => "French (Burkina Faso)",
|
||||
// "fr_BI" => "French (Burundi)",
|
||||
// "fr_CM" => "French (Cameroon)",
|
||||
// "fr_CA" => "French (Canada)",
|
||||
// "fr_CF" => "French (Central African Republic)",
|
||||
// "fr_TD" => "French (Chad)",
|
||||
// "fr_KM" => "French (Comoros)",
|
||||
// "fr_CG" => "French (Congo - Brazzaville)",
|
||||
// "fr_CD" => "French (Congo - Kinshasa)",
|
||||
// "fr_CI" => "French (Côte d’Ivoire)",
|
||||
// "fr_DJ" => "French (Djibouti)",
|
||||
// "fr_GQ" => "French (Equatorial Guinea)",
|
||||
// "fr_FR" => "French (France)",
|
||||
// "fr_GA" => "French (Gabon)",
|
||||
// "fr_GP" => "French (Guadeloupe)",
|
||||
// "fr_GN" => "French (Guinea)",
|
||||
// "fr_LU" => "French (Luxembourg)",
|
||||
// "fr_MG" => "French (Madagascar)",
|
||||
// "fr_ML" => "French (Mali)",
|
||||
// "fr_MQ" => "French (Martinique)",
|
||||
// "fr_MC" => "French (Monaco)",
|
||||
// "fr_NE" => "French (Niger)",
|
||||
// "fr_RW" => "French (Rwanda)",
|
||||
// "fr_RE" => "French (Réunion)",
|
||||
// "fr_BL" => "French (Saint Barthélemy)",
|
||||
// "fr_MF" => "French (Saint Martin)",
|
||||
// "fr_SN" => "French (Senegal)",
|
||||
// "fr_CH" => "French (Switzerland)",
|
||||
// "fr_TG" => "French (Togo)",
|
||||
//'fr' => 'French',
|
||||
// "ff_SN" => "Fulah (Senegal)",
|
||||
// "ff" => "Fulah",
|
||||
// "gl_ES" => "Galician (Spain)",
|
||||
// "gl" => "Galician",
|
||||
// "lg_UG" => "Ganda (Uganda)",
|
||||
// "lg" => "Ganda",
|
||||
// "ka_GE" => "Georgian (Georgia)",
|
||||
// "ka" => "Georgian",
|
||||
// "de_AT" => "German (Austria)",
|
||||
// "de_BE" => "German (Belgium)",
|
||||
// "de_DE" => "German (Germany)",
|
||||
// "de_LI" => "German (Liechtenstein)",
|
||||
// "de_LU" => "German (Luxembourg)",
|
||||
// "de_CH" => "German (Switzerland)",
|
||||
// "de" => "German",
|
||||
// "el_CY" => "Greek (Cyprus)",
|
||||
// "el_GR" => "Greek (Greece)",
|
||||
// "el" => "Greek",
|
||||
// "gu_IN" => "Gujarati (India)",
|
||||
// "gu" => "Gujarati",
|
||||
// "guz_KE" => "Gusii (Kenya)",
|
||||
// "guz" => "Gusii",
|
||||
// "ha_Latn" => "Hausa (Latin)",
|
||||
// "ha_Latn_GH" => "Hausa (Latin, Ghana)",
|
||||
// "ha_Latn_NE" => "Hausa (Latin, Niger)",
|
||||
// "ha_Latn_NG" => "Hausa (Latin, Nigeria)",
|
||||
// "ha" => "Hausa",
|
||||
// "haw_US" => "Hawaiian (United States)",
|
||||
// "haw" => "Hawaiian",
|
||||
// "he_IL" => "Hebrew (Israel)",
|
||||
// "he" => "Hebrew",
|
||||
// "hi_IN" => "Hindi (India)",
|
||||
// "hi" => "Hindi",
|
||||
// "hu_HU" => "Hungarian (Hungary)",
|
||||
// "hu" => "Hungarian",
|
||||
// "is_IS" => "Icelandic (Iceland)",
|
||||
// "is" => "Icelandic",
|
||||
// "ig_NG" => "Igbo (Nigeria)",
|
||||
// "ig" => "Igbo",
|
||||
// "id_ID" => "Indonesian (Indonesia)",
|
||||
// "id" => "Indonesian",
|
||||
// "ga_IE" => "Irish (Ireland)",
|
||||
// "ga" => "Irish",
|
||||
// "it_IT" => "Italian (Italy)",
|
||||
// "it_CH" => "Italian (Switzerland)",
|
||||
//'it' => 'Italian',
|
||||
// "ja_JP" => "Japanese (Japan)",
|
||||
// "ja" => "Japanese",
|
||||
// "kea_CV" => "Kabuverdianu (Cape Verde)",
|
||||
// "kea" => "Kabuverdianu",
|
||||
// "kab_DZ" => "Kabyle (Algeria)",
|
||||
// "kab" => "Kabyle",
|
||||
// "kl_GL" => "Kalaallisut (Greenland)",
|
||||
// "kl" => "Kalaallisut",
|
||||
// "kln_KE" => "Kalenjin (Kenya)",
|
||||
// "kln" => "Kalenjin",
|
||||
// "kam_KE" => "Kamba (Kenya)",
|
||||
// "kam" => "Kamba",
|
||||
// "kn_IN" => "Kannada (India)",
|
||||
// "kn" => "Kannada",
|
||||
// "kk_Cyrl" => "Kazakh (Cyrillic)",
|
||||
// "kk_Cyrl_KZ" => "Kazakh (Cyrillic, Kazakhstan)",
|
||||
// "kk" => "Kazakh",
|
||||
// "km_KH" => "Khmer (Cambodia)",
|
||||
// "km" => "Khmer",
|
||||
// "ki_KE" => "Kikuyu (Kenya)",
|
||||
// "ki" => "Kikuyu",
|
||||
// "rw_RW" => "Kinyarwanda (Rwanda)",
|
||||
// "rw" => "Kinyarwanda",
|
||||
// "kok_IN" => "Konkani (India)",
|
||||
// "kok" => "Konkani",
|
||||
// "ko_KR" => "Korean (South Korea)",
|
||||
// "ko" => "Korean",
|
||||
// "khq_ML" => "Koyra Chiini (Mali)",
|
||||
// "khq" => "Koyra Chiini",
|
||||
// "ses_ML" => "Koyraboro Senni (Mali)",
|
||||
// "ses" => "Koyraboro Senni",
|
||||
// "lag_TZ" => "Langi (Tanzania)",
|
||||
// "lag" => "Langi",
|
||||
// "lv_LV" => "Latvian (Latvia)",
|
||||
// "lv" => "Latvian",
|
||||
// "lt_LT" => "Lithuanian (Lithuania)",
|
||||
// "lt" => "Lithuanian",
|
||||
// "luo_KE" => "Luo (Kenya)",
|
||||
// "luo" => "Luo",
|
||||
// "luy_KE" => "Luyia (Kenya)",
|
||||
// "luy" => "Luyia",
|
||||
// "mk_MK" => "Macedonian (Macedonia)",
|
||||
// "mk" => "Macedonian",
|
||||
// "jmc_TZ" => "Machame (Tanzania)",
|
||||
// "jmc" => "Machame",
|
||||
// "kde_TZ" => "Makonde (Tanzania)",
|
||||
// "kde" => "Makonde",
|
||||
// "mg_MG" => "Malagasy (Madagascar)",
|
||||
// "mg" => "Malagasy",
|
||||
// "ms_BN" => "Malay (Brunei)",
|
||||
// "ms_MY" => "Malay (Malaysia)",
|
||||
// "ms" => "Malay",
|
||||
// "ml_IN" => "Malayalam (India)",
|
||||
// "ml" => "Malayalam",
|
||||
// "mt_MT" => "Maltese (Malta)",
|
||||
// "mt" => "Maltese",
|
||||
// "gv_GB" => "Manx (United Kingdom)",
|
||||
// "gv" => "Manx",
|
||||
// "mr_IN" => "Marathi (India)",
|
||||
// "mr" => "Marathi",
|
||||
// "mas_KE" => "Masai (Kenya)",
|
||||
// "mas_TZ" => "Masai (Tanzania)",
|
||||
// "mas" => "Masai",
|
||||
// "mer_KE" => "Meru (Kenya)",
|
||||
// "mer" => "Meru",
|
||||
// "mfe_MU" => "Morisyen (Mauritius)",
|
||||
// "mfe" => "Morisyen",
|
||||
// "naq_NA" => "Nama (Namibia)",
|
||||
// "naq" => "Nama",
|
||||
// "ne_IN" => "Nepali (India)",
|
||||
// "ne_NP" => "Nepali (Nepal)",
|
||||
// "ne" => "Nepali",
|
||||
// "nd_ZW" => "North Ndebele (Zimbabwe)",
|
||||
// "nd" => "North Ndebele",
|
||||
// "nb_NO" => "Norwegian Bokmål (Norway)",
|
||||
// "nb" => "Norwegian Bokmål",
|
||||
// "nn_NO" => "Norwegian Nynorsk (Norway)",
|
||||
// "nn" => "Norwegian Nynorsk",
|
||||
// "nyn_UG" => "Nyankole (Uganda)",
|
||||
// "nyn" => "Nyankole",
|
||||
// "or_IN" => "Oriya (India)",
|
||||
// "or" => "Oriya",
|
||||
// "om_ET" => "Oromo (Ethiopia)",
|
||||
// "om_KE" => "Oromo (Kenya)",
|
||||
// "om" => "Oromo",
|
||||
// "ps_AF" => "Pashto (Afghanistan)",
|
||||
// "ps" => "Pashto",
|
||||
// "fa_AF" => "Persian (Afghanistan)",
|
||||
// "fa_IR" => "Persian (Iran)",
|
||||
// "fa" => "Persian",
|
||||
// "pl_PL" => "Polish (Poland)",
|
||||
// "pl" => "Polish",
|
||||
// "pt_BR" => "Portuguese (Brazil)",
|
||||
// "pt_GW" => "Portuguese (Guinea-Bissau)",
|
||||
// "pt_MZ" => "Portuguese (Mozambique)",
|
||||
// "pt_PT" => "Portuguese (Portugal)",
|
||||
// "pt" => "Portuguese",
|
||||
// "pa_Arab" => "Punjabi (Arabic)",
|
||||
// "pa_Arab_PK" => "Punjabi (Arabic, Pakistan)",
|
||||
// "pa_Guru" => "Punjabi (Gurmukhi)",
|
||||
// "pa_Guru_IN" => "Punjabi (Gurmukhi, India)",
|
||||
// "pa" => "Punjabi",
|
||||
// "ro_MD" => "Romanian (Moldova)",
|
||||
// "ro_RO" => "Romanian (Romania)",
|
||||
//'ro' => 'Romanian',
|
||||
// "rm_CH" => "Romansh (Switzerland)",
|
||||
// "rm" => "Romansh",
|
||||
// "rof_TZ" => "Rombo (Tanzania)",
|
||||
// "rof" => "Rombo",
|
||||
// "ru_MD" => "Russian (Moldova)",
|
||||
// "ru_RU" => "Russian (Russia)",
|
||||
// "ru_UA" => "Russian (Ukraine)",
|
||||
// "ru" => "Russian",
|
||||
// "rwk_TZ" => "Rwa (Tanzania)",
|
||||
// "rwk" => "Rwa",
|
||||
// "saq_KE" => "Samburu (Kenya)",
|
||||
// "saq" => "Samburu",
|
||||
// "sg_CF" => "Sango (Central African Republic)",
|
||||
// "sg" => "Sango",
|
||||
// "seh_MZ" => "Sena (Mozambique)",
|
||||
// "seh" => "Sena",
|
||||
// "sr_Cyrl" => "Serbian (Cyrillic)",
|
||||
// "sr_Cyrl_BA" => "Serbian (Cyrillic, Bosnia and Herzegovina)",
|
||||
// "sr_Cyrl_ME" => "Serbian (Cyrillic, Montenegro)",
|
||||
// "sr_Cyrl_RS" => "Serbian (Cyrillic, Serbia)",
|
||||
// "sr_Latn" => "Serbian (Latin)",
|
||||
// "sr_Latn_BA" => "Serbian (Latin, Bosnia and Herzegovina)",
|
||||
// "sr_Latn_ME" => "Serbian (Latin, Montenegro)",
|
||||
// "sr_Latn_RS" => "Serbian (Latin, Serbia)",
|
||||
// "sr" => "Serbian",
|
||||
// "sn_ZW" => "Shona (Zimbabwe)",
|
||||
// "sn" => "Shona",
|
||||
// "ii_CN" => "Sichuan Yi (China)",
|
||||
// "ii" => "Sichuan Yi",
|
||||
// "si_LK" => "Sinhala (Sri Lanka)",
|
||||
// "si" => "Sinhala",
|
||||
// "sk_SK" => "Slovak (Slovakia)",
|
||||
// "sk" => "Slovak",
|
||||
// "sl_SI" => "Slovenian (Slovenia)",
|
||||
// "sl" => "Slovenian",
|
||||
// "xog_UG" => "Soga (Uganda)",
|
||||
// "xog" => "Soga",
|
||||
// "so_DJ" => "Somali (Djibouti)",
|
||||
// "so_ET" => "Somali (Ethiopia)",
|
||||
// "so_KE" => "Somali (Kenya)",
|
||||
// "so_SO" => "Somali (Somalia)",
|
||||
// "so" => "Somali",
|
||||
// "es_AR" => "Spanish (Argentina)",
|
||||
// "es_BO" => "Spanish (Bolivia)",
|
||||
// "es_CL" => "Spanish (Chile)",
|
||||
// "es_CO" => "Spanish (Colombia)",
|
||||
// "es_CR" => "Spanish (Costa Rica)",
|
||||
// "es_DO" => "Spanish (Dominican Republic)",
|
||||
// "es_EC" => "Spanish (Ecuador)",
|
||||
// "es_SV" => "Spanish (El Salvador)",
|
||||
// "es_GQ" => "Spanish (Equatorial Guinea)",
|
||||
// "es_GT" => "Spanish (Guatemala)",
|
||||
// "es_HN" => "Spanish (Honduras)",
|
||||
// "es_419" => "Spanish (Latin America)",
|
||||
// "es_MX" => "Spanish (Mexico)",
|
||||
// "es_NI" => "Spanish (Nicaragua)",
|
||||
// "es_PA" => "Spanish (Panama)",
|
||||
// "es_PY" => "Spanish (Paraguay)",
|
||||
// "es_PE" => "Spanish (Peru)",
|
||||
// "es_PR" => "Spanish (Puerto Rico)",
|
||||
// "es_ES" => "Spanish (Spain)",
|
||||
// "es_US" => "Spanish (United States)",
|
||||
// "es_UY" => "Spanish (Uruguay)",
|
||||
// "es_VE" => "Spanish (Venezuela)",
|
||||
// "es" => "Spanish",
|
||||
// "sw_KE" => "Swahili (Kenya)",
|
||||
// "sw_TZ" => "Swahili (Tanzania)",
|
||||
// "sw" => "Swahili",
|
||||
// "sv_FI" => "Swedish (Finland)",
|
||||
// "sv_SE" => "Swedish (Sweden)",
|
||||
// "sv" => "Swedish",
|
||||
// "gsw_CH" => "Swiss German (Switzerland)",
|
||||
// "gsw" => "Swiss German",
|
||||
// "shi_Latn" => "Tachelhit (Latin)",
|
||||
// "shi_Latn_MA" => "Tachelhit (Latin, Morocco)",
|
||||
// "shi_Tfng" => "Tachelhit (Tifinagh)",
|
||||
// "shi_Tfng_MA" => "Tachelhit (Tifinagh, Morocco)",
|
||||
// "shi" => "Tachelhit",
|
||||
// "dav_KE" => "Taita (Kenya)",
|
||||
// "dav" => "Taita",
|
||||
// "ta_IN" => "Tamil (India)",
|
||||
// "ta_LK" => "Tamil (Sri Lanka)",
|
||||
// "ta" => "Tamil",
|
||||
// "te_IN" => "Telugu (India)",
|
||||
// "te" => "Telugu",
|
||||
// "teo_KE" => "Teso (Kenya)",
|
||||
// "teo_UG" => "Teso (Uganda)",
|
||||
// "teo" => "Teso",
|
||||
// "th_TH" => "Thai (Thailand)",
|
||||
// "th" => "Thai",
|
||||
// "bo_CN" => "Tibetan (China)",
|
||||
// "bo_IN" => "Tibetan (India)",
|
||||
// "bo" => "Tibetan",
|
||||
// "ti_ER" => "Tigrinya (Eritrea)",
|
||||
// "ti_ET" => "Tigrinya (Ethiopia)",
|
||||
// "ti" => "Tigrinya",
|
||||
// "to_TO" => "Tonga (Tonga)",
|
||||
// "to" => "Tonga",
|
||||
// "tr_TR" => "Turkish (Turkey)",
|
||||
// "tr" => "Turkish",
|
||||
// "uk_UA" => "Ukrainian (Ukraine)",
|
||||
// "uk" => "Ukrainian",
|
||||
// "ur_IN" => "Urdu (India)",
|
||||
// "ur_PK" => "Urdu (Pakistan)",
|
||||
// "ur" => "Urdu",
|
||||
// "uz_Arab" => "Uzbek (Arabic)",
|
||||
// "uz_Arab_AF" => "Uzbek (Arabic, Afghanistan)",
|
||||
// "uz_Cyrl" => "Uzbek (Cyrillic)",
|
||||
// "uz_Cyrl_UZ" => "Uzbek (Cyrillic, Uzbekistan)",
|
||||
// "uz_Latn" => "Uzbek (Latin)",
|
||||
// "uz_Latn_UZ" => "Uzbek (Latin, Uzbekistan)",
|
||||
// "uz" => "Uzbek",
|
||||
// "vi_VN" => "Vietnamese (Vietnam)",
|
||||
// "vi" => "Vietnamese",
|
||||
// "vun_TZ" => "Vunjo (Tanzania)",
|
||||
// "vun" => "Vunjo",
|
||||
// "cy_GB" => "Welsh (United Kingdom)",
|
||||
// "cy" => "Welsh",
|
||||
// "yo_NG" => "Yoruba (Nigeria)",
|
||||
// "yo" => "Yoruba",
|
||||
// "zu_ZA" => "Zulu (South Africa)",
|
||||
// "zu" => "Zulu"
|
||||
],
|
||||
|
||||
'view_namespaces' => [
|
||||
'buttons' => [
|
||||
'crud::buttons', // falls back to 'resources/views/vendor/backpack/crud/buttons'
|
||||
],
|
||||
'columns' => [
|
||||
'crud::columns', // falls back to 'resources/views/vendor/backpack/crud/columns'
|
||||
],
|
||||
'fields' => [
|
||||
'crud::fields', // falls back to 'resources/views/vendor/backpack/crud/fields'
|
||||
],
|
||||
'filters' => [
|
||||
'crud::filters', // falls back to 'resources/views/vendor/backpack/crud/filters'
|
||||
],
|
||||
],
|
||||
// the uploaders for the `withFiles` macro
|
||||
'uploaders' => [
|
||||
'withFiles' => [
|
||||
'image' => \Backpack\CRUD\app\Library\Uploaders\SingleBase64Image::class,
|
||||
'upload' => \Backpack\CRUD\app\Library\Uploaders\SingleFile::class,
|
||||
'upload_multiple' => \Backpack\CRUD\app\Library\Uploaders\MultipleFiles::class,
|
||||
],
|
||||
],
|
||||
|
||||
'file_name_generator' => \Backpack\CRUD\app\Library\Uploaders\Support\FileNameGenerator::class,
|
||||
|
||||
];
|
44
config/backpack/operations/create.php
Normal file
44
config/backpack/operations/create.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Configurations for Backpack's CreateOperation.
|
||||
*
|
||||
* @see https://backpackforlaravel.com/docs/crud-operation-create
|
||||
*/
|
||||
|
||||
return [
|
||||
// Define the size/looks of the content div for all CRUDs
|
||||
// To override per view use $this->crud->setCreateContentClass('class-string')
|
||||
'contentClass' => 'col-md-12 bold-labels',
|
||||
|
||||
// When using tabbed forms (create & update), what kind of tabs would you like?
|
||||
'tabsType' => 'horizontal', //options: horizontal, vertical
|
||||
|
||||
// How would you like the validation errors to be shown?
|
||||
'groupedErrors' => true,
|
||||
'inlineErrors' => true,
|
||||
|
||||
// when the page loads, put the cursor on the first input?
|
||||
'autoFocusOnFirstField' => true,
|
||||
|
||||
// Where do you want to redirect the user by default, save?
|
||||
// options: save_and_back, save_and_edit, save_and_new
|
||||
'defaultSaveAction' => 'save_and_back',
|
||||
|
||||
// When the user chooses "save and back" or "save and new", show a bubble
|
||||
// for the fact that the default save action has been changed?
|
||||
'showSaveActionChange' => true, //options: true, false
|
||||
|
||||
// Should we show a cancel button to the user?
|
||||
'showCancelButton' => true,
|
||||
|
||||
// Should we warn the user before leaving the page with unsaved changes?
|
||||
// NOTE: this works by removing all fields from the form data serialization where field name starts with "_" (underscore). Usualy backpack internal attributes.
|
||||
// if you have fields that start with an underscore, you need to change the field name, or this functionality wont detect changes in that field.
|
||||
'warnBeforeLeaving' => false,
|
||||
|
||||
// Before saving the entry, how would you like the request to be stripped?
|
||||
// - false - use Backpack's default (ONLY save inputs that have fields)
|
||||
// - invokable class - custom stripping (the return should be an array with input names)
|
||||
// 'strippedRequest' => App\Http\Requests\StripBackpackRequest::class,
|
||||
];
|
39
config/backpack/operations/form.php
Normal file
39
config/backpack/operations/form.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Default configurations for custom form operations.
|
||||
*/
|
||||
|
||||
return [
|
||||
// Define the size/looks of the content div for all CRUDs
|
||||
// To override per view use $this->crud->setCreateContentClass('class-string')
|
||||
'contentClass' => 'col-md-12 bold-labels',
|
||||
|
||||
// When using tabbed forms (create & update), what kind of tabs would you like?
|
||||
'tabsType' => 'horizontal', //options: horizontal, vertical
|
||||
|
||||
// How would you like the validation errors to be shown?
|
||||
'groupedErrors' => true,
|
||||
'inlineErrors' => true,
|
||||
|
||||
// when the page loads, put the cursor on the first input?
|
||||
'autoFocusOnFirstField' => true,
|
||||
|
||||
// Where do you want to redirect the user by default, save?
|
||||
'defaultSaveAction' => 'save_and_back',
|
||||
|
||||
// When the user chooses "save and back" or "save and new", show a bubble
|
||||
// for the fact that the default save action has been changed?
|
||||
'showSaveActionChange' => false, //options: true, false
|
||||
|
||||
// Should we show a cancel button to the user?
|
||||
'showCancelButton' => true,
|
||||
|
||||
// Should we warn a user before leaving the page with unsaved changes?
|
||||
'warnBeforeLeaving' => false,
|
||||
|
||||
// Before saving the entry, how would you like the request to be stripped?
|
||||
// - false - use Backpack's default (ONLY save inputs that have fields)
|
||||
// - invokable class - custom stripping (the return should be an array with input names)
|
||||
// 'strippedRequest' => App\Http\Requests\StripBackpackRequest::class,
|
||||
];
|
84
config/backpack/operations/list.php
Normal file
84
config/backpack/operations/list.php
Normal file
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Configurations for Backpack's ListOperation.
|
||||
*
|
||||
* @see https://backpackforlaravel.com/docs/crud-operation-list-entries
|
||||
*/
|
||||
|
||||
return [
|
||||
// Define the size/looks of the content div for all CRUDs
|
||||
// To override per view use $this->crud->setListContentClass('class-string')
|
||||
'contentClass' => 'col-md-12',
|
||||
|
||||
// enable the datatables-responsive plugin, which hides columns if they don't fit?
|
||||
// if not, a horizontal scrollbar will be shown instead
|
||||
'responsiveTable' => true,
|
||||
|
||||
// stores pagination and filters in localStorage for two hours
|
||||
// whenever the user tries to see that page, backpack loads the previous pagination and filtration
|
||||
'persistentTable' => true,
|
||||
|
||||
// show search bar in the top-right corner?
|
||||
'searchableTable' => true,
|
||||
|
||||
// how much time should the system wait before triggering the search function after the user stops typing?
|
||||
'searchDelay' => 400,
|
||||
|
||||
// the time the table will be persisted in minutes
|
||||
// after this the table info is cleared from localStorage.
|
||||
// use false to never force localStorage clear. (default)
|
||||
// keep in mind: User can clear their localStorage whenever they want.
|
||||
|
||||
'persistentTableDuration' => false,
|
||||
|
||||
// How many items should be shown by default by the Datatable?
|
||||
// This value can be overwritten on a specific CRUD by calling
|
||||
// $this->crud->setDefaultPageLength(50);
|
||||
'defaultPageLength' => 10,
|
||||
|
||||
// A 1D array of options which will be used for both the displayed option and the value, or
|
||||
// A 2D array in which the first array is used to define the value options and the second array the displayed options
|
||||
// If a 2D array is used, strings in the right hand array will be automatically run through trans()
|
||||
'pageLengthMenu' => [[10, 25, 50, 100, -1], [10, 25, 50, 100, 'backpack::crud.all']],
|
||||
|
||||
// How important is it for the action buttons to be visible?
|
||||
// - 0 - most important
|
||||
// - 1 - as important as bulk buttons
|
||||
// - 2-3 - more important than the rest of the columns
|
||||
// - 4 - less important than most columns
|
||||
'actionsColumnPriority' => 1,
|
||||
|
||||
// Nest action buttons within a dropdown in actions column
|
||||
'lineButtonsAsDropdown' => false,
|
||||
|
||||
// What is the minimum actions for the dropdown to be created
|
||||
// Example: when minimum to drop is «2», any row with less than «2» action buttons
|
||||
// will not create a dropdown, but will show the buttons inline
|
||||
'lineButtonsAsDropdownMinimum' => 1,
|
||||
|
||||
// Force «X» actions to be shown inline before the dropdown is created
|
||||
// Example: when setting this to «2», the first «2» actions will be shown inline
|
||||
// and the rest will be moved to the dropdown
|
||||
'lineButtonsAsDropdownShowBefore' => 0,
|
||||
|
||||
// Show a "Reset" button next to the List operation subheading
|
||||
// (Showing 1 to 25 of 9999 entries. Reset)
|
||||
// that allows the user to erase local storage for that datatable,
|
||||
// thus clearing any searching, filtering or pagination that has been
|
||||
// remembered and persisted using persistentTable
|
||||
'resetButton' => true,
|
||||
|
||||
// The query operator that is used to search on the table.
|
||||
// If you are using PostgreSQL you might want to change
|
||||
// to `ilike` for case-insensitive search
|
||||
'searchOperator' => 'like',
|
||||
|
||||
// Display the `Showing X of XX entries (filtered from X entries)`?
|
||||
// Setting this to false will improve performance on big datasets.
|
||||
'showEntryCount' => true,
|
||||
|
||||
// when list operation load the information from database, should Backpack eager load the relations ?
|
||||
// this setting is enabled by default as it reduces the amount of queries required to load the page
|
||||
'eagerLoadRelationships' => true,
|
||||
];
|
16
config/backpack/operations/reorder.php
Normal file
16
config/backpack/operations/reorder.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Configurations for Backpack ReorderOperation.
|
||||
*
|
||||
* @see https://backpackforlaravel.com/docs/crud-operation-reorder
|
||||
*/
|
||||
|
||||
return [
|
||||
// Define the size/looks of the content div for all CRUDs
|
||||
// To override per Controller use $this->crud->setReorderContentClass('class-string')
|
||||
'contentClass' => 'col-md-12 col-md-offset-2',
|
||||
|
||||
// should the content of the reorder label be escaped?
|
||||
'escaped' => false,
|
||||
];
|
29
config/backpack/operations/show.php
Normal file
29
config/backpack/operations/show.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Configurations for Backpack's ShowOperation.
|
||||
*
|
||||
* @see https://backpackforlaravel.com/docs/crud-operation-show
|
||||
*/
|
||||
|
||||
return [
|
||||
// Define the size/looks of the content div for all CRUDs
|
||||
// To override per Controller use $this->crud->setShowContentClass('class-string')
|
||||
'contentClass' => 'col-md-12',
|
||||
|
||||
// Automatically add all columns from the db table?
|
||||
'setFromDb' => true,
|
||||
|
||||
// Automatically add created_at and updated_at columns, if model has timestamps?
|
||||
'timestamps' => true,
|
||||
|
||||
// If model has SoftDeletes, allow the admin to access the Show page for
|
||||
// soft deleted items & add a deleted_at column to ShowOperation?
|
||||
'softDeletes' => false,
|
||||
|
||||
// Enable to group columns in tabs
|
||||
'tabsEnabled' => false,
|
||||
|
||||
// When using tabbed forms (create & update), what kind of tabs would you like?
|
||||
'tabsType' => 'horizontal', //options: horizontal, vertical
|
||||
];
|
53
config/backpack/operations/update.php
Normal file
53
config/backpack/operations/update.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Configurations for Backpack's UpdateOperation.
|
||||
*
|
||||
* @see https://backpackforlaravel.com/docs/crud-operation-update
|
||||
*/
|
||||
|
||||
return [
|
||||
// Define the size/looks of the content div for all CRUDs
|
||||
// To override per view use $this->crud->setEditContentClass('class-string')
|
||||
'contentClass' => 'col-md-12 bold-labels',
|
||||
|
||||
// When using tabbed forms (create & update), what kind of tabs would you like?
|
||||
'tabsType' => 'horizontal', //options: horizontal, vertical
|
||||
|
||||
// How would you like the validation errors to be shown?
|
||||
'groupedErrors' => true,
|
||||
'inlineErrors' => true,
|
||||
|
||||
// when the page loads, put the cursor on the first input?
|
||||
'autoFocusOnFirstField' => true,
|
||||
|
||||
// Where do you want to redirect the user by default, save?
|
||||
// options: save_and_back, save_and_edit, save_and_new
|
||||
'defaultSaveAction' => 'save_and_back',
|
||||
|
||||
// When the user chooses "save and back" or "save and new", show a bubble
|
||||
// for the fact that the default save action has been changed?
|
||||
'showSaveActionChange' => true, //options: true, false
|
||||
|
||||
// Should we show a cancel button to the user?
|
||||
'showCancelButton' => true,
|
||||
|
||||
// Should we show the delete button on the edit form?
|
||||
'showDeleteButton' => false,
|
||||
|
||||
// Should we warn a user before leaving the page with unsaved changes?
|
||||
'warnBeforeLeaving' => false,
|
||||
|
||||
// when viewing the update form of an entry in a language that's not translated should Backpack show a notice
|
||||
// that allows the user to fill the form from another language?
|
||||
'showTranslationNotice' => true,
|
||||
|
||||
// when loading an update form, should Backpack eager load the relationship information from database?
|
||||
// this is generally a good thing to enable, as it helps to reduce the number of queries.
|
||||
'eagerLoadRelationships' => false,
|
||||
|
||||
// Before saving the entry, how would you like the request to be stripped?
|
||||
// - false - use Backpack's default (ONLY save inputs that have fields)
|
||||
// - invokable class - custom stripping (the return should be an array with input names)
|
||||
// 'strippedRequest' => App\Http\Requests\StripBackpackRequest::class,
|
||||
];
|
174
config/backpack/theme-tabler.php
Normal file
174
config/backpack/theme-tabler.php
Normal file
@ -0,0 +1,174 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Theme Configuration Values
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The file provides extra configs on top of config/backpack/ui.php
|
||||
|
|
||||
| Any value set here will override the ones defined in
|
||||
| config/backpack/ui.php when this theme is in use.
|
||||
|
|
||||
*/
|
||||
|
||||
/**
|
||||
* 1st layer of customization
|
||||
*
|
||||
* Simple pick a layout and let Backpack decide the best look for it.
|
||||
* No extra step is required.
|
||||
*
|
||||
* Possible values: horizontal, horizontal_dark, horizontal_overlap, vertical,
|
||||
* vertical_dark, vertical_transparent (legacy theme), right_vertical, right_vertical_dark, right_vertical_transparent
|
||||
*/
|
||||
'layout' => 'vertical',
|
||||
|
||||
/**
|
||||
* Pick a login page layout.
|
||||
* Possible values: default, illustration, cover
|
||||
*/
|
||||
'auth_layout' => 'default', // default, illustration, cover
|
||||
|
||||
/**
|
||||
* Here you can easily load your own extra css styles.
|
||||
* Note: if you want to customize the style to create your own custom skin colors:
|
||||
* - make a copy of the file "vendor/backpack/theme-tabler/resources/assets/css/colors.css" into your project
|
||||
* - adjust colors variables as you wish
|
||||
* - replace "base_path('vendor/backpack/theme-tabler/resources/assets/css/colors.css')," with the path to the file created above
|
||||
* - boom!
|
||||
*/
|
||||
'styles' => [
|
||||
base_path('vendor/backpack/theme-tabler/resources/assets/css/color-adjustments.css'),
|
||||
base_path('vendor/backpack/theme-tabler/resources/assets/css/colors.css'),
|
||||
],
|
||||
|
||||
/**
|
||||
* 2nd Layer of customization
|
||||
*
|
||||
* If you need to further customize the way your panel looks,
|
||||
* these options will help you achieve that.
|
||||
*/
|
||||
'options' => [
|
||||
/**
|
||||
* The available color modes.
|
||||
*/
|
||||
'colorModes' => [
|
||||
'system' => 'la-desktop',
|
||||
'light' => 'la-sun',
|
||||
'dark' => 'la-moon',
|
||||
],
|
||||
|
||||
/**
|
||||
* The color mode used by default.
|
||||
*/
|
||||
'defaultColorMode' => 'light', // system, light, dark
|
||||
|
||||
/**
|
||||
* When true, a switch is displayed to let admins choose their favorite theme mode.
|
||||
* When false, the theme will only use the "defaultColorMode" set above.
|
||||
* In case "defaultColorMode" is null, system is the default.
|
||||
*/
|
||||
'showColorModeSwitcher' => true,
|
||||
|
||||
/**
|
||||
* Fix the top-header component (present in "vertical_transparent") and the menu when the layout type is set as "horizontal".
|
||||
* This value is skipped when the layout type is horizontal-overlap, using false as default.
|
||||
*/
|
||||
'useStickyHeader' => false,
|
||||
|
||||
/**
|
||||
* When true, the content area will take the whole screen width.
|
||||
*/
|
||||
'useFluidContainers' => false,
|
||||
|
||||
/**
|
||||
* When true, the sidebar content for vertical layouts will not scroll with the rest of the content.
|
||||
*/
|
||||
'sidebarFixed' => false,
|
||||
|
||||
/**
|
||||
* When true, horizontal layouts will display the classic top bar on top to free some space when multiple nav items are used.
|
||||
*/
|
||||
'doubleTopBarInHorizontalLayouts' => false,
|
||||
|
||||
/**
|
||||
* When true, the password input will have a toggle button to show/hide the password.
|
||||
*/
|
||||
'showPasswordVisibilityToggler' => false,
|
||||
],
|
||||
|
||||
/**
|
||||
* 3rd Layer of customization
|
||||
*
|
||||
* In case the first two steps were not enough, here you have full control over
|
||||
* the classes that make up the look of your panel.
|
||||
*/
|
||||
'classes' => [
|
||||
/**
|
||||
* Use this to pass classes to the <body> HTML element, on all pages.
|
||||
*/
|
||||
'body' => null,
|
||||
|
||||
/**
|
||||
* For background colors use:
|
||||
* bg-dark, bg-primary, bg-secondary, bg-danger, bg-warning, bg-success, bg-info, bg-blue, bg-light-blue,
|
||||
* bg-indigo, bg-purple, bg-pink, bg-red, bg-orange, bg-yellow, bg-green, bg-teal, bg-cyan, bg-white.
|
||||
*
|
||||
* For links to be visible on different background colors use: "navbar-dark", "navbar-light".
|
||||
*
|
||||
*/
|
||||
'topHeader' => null,
|
||||
|
||||
/**
|
||||
* Applies only for Vertical Menu Layout
|
||||
* For standard sidebar look (transparent):
|
||||
* - Remove "navbar-dark/light"
|
||||
* - Remove "navbar-light/dark" from 'classes.topHeader' and instead use "bg-light"
|
||||
* You can also add a background class like bg-dark, bg-primary, bg-secondary, bg-danger, bg-warning, bg-success,
|
||||
* bg-info, bg-blue, bg-light-blue, bg-indigo, bg-purple, bg-pink, bg-red, bg-orange, bg-yellow, bg-green, bg-teal, bg-cyan
|
||||
*/
|
||||
'sidebar' => null,
|
||||
|
||||
/**
|
||||
* Used in the top container menu when the layout is of horizontal type.
|
||||
*/
|
||||
'menuHorizontalContainer' => null,
|
||||
|
||||
/**
|
||||
* Used in the top menu content when the layout is of horizontal type.
|
||||
*/
|
||||
'menuHorizontalContent' => null,
|
||||
|
||||
/**
|
||||
* Make transparent with footer-transparent.
|
||||
* Hide it with d-none.
|
||||
*
|
||||
* Change background color with bg-dark, bg-primary, bg-secondary, bg-danger, bg-warning, bg-success, bg-info,
|
||||
* bg-blue, bg-light-blue, bg-indigo, bg-purple, bg-pink, bg-red, bg-orange, bg-yellow, bg-green, bg-teal, bg-cyan, bg-white.
|
||||
*/
|
||||
'footer' => null,
|
||||
|
||||
/**
|
||||
* Use this to pass classes to the table displayed in List Operation
|
||||
* It defaults to: "table table-striped table-hover nowrap rounded card-table table-vcenter card-table shadow-xs border-xs"
|
||||
*/
|
||||
'table' => null,
|
||||
|
||||
/**
|
||||
* Use this to pass classes to the table wrapper component displayed in List Operation
|
||||
*/
|
||||
'tableWrapper' => null,
|
||||
],
|
||||
|
||||
/**
|
||||
* 4th Layer of customization
|
||||
*
|
||||
* Alright, if nothing so far met your need, then you still have an easy way to build
|
||||
* a custom layout using the already existing components of this theme.
|
||||
*
|
||||
* 1. Create a new blade file in resources/views/layouts/your-custom-layout.blade.php
|
||||
* 2. Replace the value of layout on this file with "your-custom-layout"
|
||||
* 3. Customize the blade and place components such as sidebar, header, top-bar, where you need them!
|
||||
*/
|
||||
];
|
147
config/backpack/ui.php
Normal file
147
config/backpack/ui.php
Normal file
@ -0,0 +1,147 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
// IMPORTANT NOTE: The configurations here get overridden by theme config files.
|
||||
//
|
||||
// Eg. If you're using theme-tabler and config/backpack/theme-tabler.php
|
||||
// has "breadcrumbs" set as false, then THAT value will be used instead
|
||||
// of the value in this file.
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Theme (User Interface)
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
// Change the view namespace in order to load a different theme than the one Backpack provides.
|
||||
// You can create child themes yourself, by creating a view folder anywhere in your resources/views
|
||||
// and choosing that view_namespace instead of the default one. Backpack will load a file from there
|
||||
// if it exists, otherwise it will load it from the fallback namespace.
|
||||
|
||||
'view_namespace' => 'backpack.theme-tabler::',
|
||||
'view_namespace_fallback' => 'backpack.theme-tabler::',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Look & feel customizations
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| To make the UI feel yours.
|
||||
|
|
||||
| Note that values set here might be overridden by theme config files
|
||||
| (eg. config/backpack/theme-tabler.php) when that theme is in use.
|
||||
|
|
||||
*/
|
||||
|
||||
// Date & Datetime Format Syntax: https://carbon.nesbot.com/docs/#api-localization
|
||||
'default_date_format' => 'D MMM YYYY',
|
||||
'default_datetime_format' => 'D MMM YYYY, HH:mm',
|
||||
|
||||
// Direction, according to language
|
||||
// (left-to-right vs right-to-left)
|
||||
'html_direction' => 'ltr',
|
||||
|
||||
// ----
|
||||
// HEAD
|
||||
// ----
|
||||
|
||||
// Project name - shown in the window title
|
||||
'project_name' => '桃園衛生局活動網站管理',
|
||||
|
||||
// Content of the HTML meta robots tag to prevent indexing and link following
|
||||
'meta_robots_content' => 'noindex, nofollow',
|
||||
|
||||
// ------
|
||||
// HEADER
|
||||
// ------
|
||||
|
||||
// When clicking on the admin panel's top-left logo/name,
|
||||
// where should the user be redirected?
|
||||
// The string below will be passed through the url() helper.
|
||||
// - default: '' (project root)
|
||||
// - alternative: 'admin' (the admin's dashboard)
|
||||
'home_link' => '',
|
||||
|
||||
// Menu logo. You can replace this with an <img> tag if you have a logo.
|
||||
'project_logo' => '<b>桃園衛生局</b>活動網站管理',
|
||||
|
||||
// Show / hide breadcrumbs on admin panel pages.
|
||||
'breadcrumbs' => true,
|
||||
|
||||
// ------
|
||||
// FOOTER
|
||||
// ------
|
||||
|
||||
// Developer or company name. Shown in footer.
|
||||
'developer_name' => false,
|
||||
|
||||
// Developer website. Link in footer. Type false if you want to hide it.
|
||||
'developer_link' => false,
|
||||
|
||||
// Show powered by Laravel Backpack in the footer? true/false
|
||||
'show_powered_by' => false,
|
||||
|
||||
// ---------
|
||||
// DASHBOARD
|
||||
// ---------
|
||||
|
||||
// Show "Getting Started with Backpack" info block?
|
||||
'show_getting_started' => env('APP_ENV') == 'local',
|
||||
|
||||
// -------------
|
||||
// GLOBAL STYLES
|
||||
// -------------
|
||||
|
||||
// CSS files that are loaded in all pages, using Laravel's asset() helper
|
||||
'styles' => [
|
||||
// 'styles/example.css',
|
||||
// 'https://some-cdn.com/example.css',
|
||||
],
|
||||
|
||||
// CSS files that are loaded in all pages, using Laravel's mix() helper
|
||||
'mix_styles' => [ // file_path => manifest_directory_path
|
||||
// 'css/app.css' => '',
|
||||
],
|
||||
|
||||
// CSS files that are loaded in all pages, using Laravel's @vite() helper
|
||||
// Please note that support for Vite was added in Laravel 9.19. Earlier versions are not able to use this feature.
|
||||
'vite_styles' => [ // resource file_path
|
||||
// 'resources/css/app.css',
|
||||
],
|
||||
|
||||
// --------------
|
||||
// GLOBAL SCRIPTS
|
||||
// --------------
|
||||
|
||||
// JS files that are loaded in all pages, using Laravel's asset() helper
|
||||
'scripts' => [
|
||||
// 'js/example.js',
|
||||
// 'https://cdn.jsdelivr.net/npm/vue@2.4.4/dist/vue.min.js',
|
||||
// 'https://cdn.jsdelivr.net/npm/react@16/umd/react.production.min.js',
|
||||
// 'https://cdn.jsdelivr.net/npm/react-dom@16/umd/react-dom.production.min.js',
|
||||
],
|
||||
|
||||
// JS files that are loaded in all pages, using Laravel's mix() helper
|
||||
'mix_scripts' => [ // file_path => manifest_directory_path
|
||||
// 'js/app.js' => '',
|
||||
],
|
||||
|
||||
// JS files that are loaded in all pages, using Laravel's @vite() helper
|
||||
'vite_scripts' => [ // resource file_path
|
||||
// 'resources/js/app.js',
|
||||
],
|
||||
|
||||
'classes' => [
|
||||
/**
|
||||
* Use this as fallback config for themes to pass classes to the table displayed in List Operation
|
||||
* It defaults to: "table table-striped table-hover nowrap rounded card-table table-vcenter card-table shadow-xs border-xs".
|
||||
*/
|
||||
'table' => null,
|
||||
|
||||
/**
|
||||
* Use this as fallback config for themes to pass classes to the table wrapper component displayed in List Operation.
|
||||
*/
|
||||
'tableWrapper' => null,
|
||||
],
|
||||
|
||||
];
|
Reference in New Issue
Block a user