Skip to content

Commit

Permalink
Merge pull request #600 from nasirkhan/dev
Browse files Browse the repository at this point in the history
Setting update/store method fixed
  • Loading branch information
nasirkhan authored May 18, 2024
2 parents c1b05a7 + d69e16d commit 68657c2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
3 changes: 2 additions & 1 deletion app/Http/Controllers/Backend/SettingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public function index()
public function store(Request $request)
{
$rules = Setting::getValidationRules();
$data = $request->validate($request, $rules);

$data = $request->validate($rules);

$validSettings = array_keys($rules);

Expand Down
30 changes: 15 additions & 15 deletions config/setting_fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
'data' => 'text', // data type, string, int, boolean
'name' => 'show_copyright', // unique name for field
'label' => 'Show Copyright', // you know what label it is
'rules' => '', // validation rule of laravel
'rules' => 'nullable', // validation rule of laravel
'class' => '', // any class for input
'value' => '1', // default value if you want
],
Expand Down Expand Up @@ -74,7 +74,7 @@
'data' => 'string', // data type, string, int, boolean
'name' => 'website_url', // unique name for field
'label' => 'Website URL', // you know what label it is
'rules' => 'required|nullable|max:191', // validation rule of laravel
'rules' => 'nullable|max:191', // validation rule of laravel
'class' => '', // any class for input
'value' => 'https://nasirkhn.com', // default value if you want
],
Expand All @@ -83,7 +83,7 @@
'data' => 'string', // data type, string, int, boolean
'name' => 'facebook_url', // unique name for field
'label' => 'Facebook Page URL', // you know what label it is
'rules' => 'required|nullable|max:191', // validation rule of laravel
'rules' => 'nullable|max:191', // validation rule of laravel
'class' => '', // any class for input
'value' => '#', // default value if you want
],
Expand All @@ -92,7 +92,7 @@
'data' => 'string', // data type, string, int, boolean
'name' => 'twitter_url', // unique name for field
'label' => 'Twitter Profile URL', // you know what label it is
'rules' => 'required|nullable|max:191', // validation rule of laravel
'rules' => 'nullable|max:191', // validation rule of laravel
'class' => '', // any class for input
'value' => 'https://twitter.com/nasirkhansaikat', // default value if you want
],
Expand All @@ -101,7 +101,7 @@
'data' => 'string', // data type, string, int, boolean
'name' => 'instagram_url', // unique name for field
'label' => 'Instagram Account URL', // you know what label it is
'rules' => 'required|nullable|max:191', // validation rule of laravel
'rules' => 'nullable|max:191', // validation rule of laravel
'class' => '', // any class for input
'value' => 'https://www.instagram.com/nasirkhansaikat', // default value if you want
],
Expand All @@ -110,7 +110,7 @@
'data' => 'string', // data type, string, int, boolean
'name' => 'youtube_url', // unique name for field
'label' => 'Youtube Channel URL', // you know what label it is
'rules' => 'required|nullable|max:191', // validation rule of laravel
'rules' => 'nullable|max:191', // validation rule of laravel
'class' => '', // any class for input
'value' => 'https://www.youtube.com/@nasirkhan', // default value if you want
],
Expand All @@ -119,7 +119,7 @@
'data' => 'string', // data type, string, int, boolean
'name' => 'linkedin_url', // unique name for field
'label' => 'LinkedIn URL', // you know what label it is
'rules' => 'required|nullable|max:191', // validation rule of laravel
'rules' => 'nullable|max:191', // validation rule of laravel
'class' => '', // any class for input
'value' => '#', // default value if you want
],
Expand All @@ -128,7 +128,7 @@
'data' => 'string', // data type, string, int, boolean
'name' => 'whatsapp_url', // unique name for field
'label' => 'WhatsApp URL', // you know what label it is
'rules' => 'required|nullable|max:191', // validation rule of laravel
'rules' => 'nullable|max:191', // validation rule of laravel
'class' => '', // any class for input
'value' => '#', // default value if you want
],
Expand All @@ -137,7 +137,7 @@
'data' => 'string', // data type, string, int, boolean
'name' => 'messenger_url', // unique name for field
'label' => 'Messenger URL', // you know what label it is
'rules' => 'required|nullable|max:191', // validation rule of laravel
'rules' => 'nullable|max:191', // validation rule of laravel
'class' => '', // any class for input
'value' => '#', // default value if you want
],
Expand Down Expand Up @@ -173,7 +173,7 @@
'data' => 'text', // data type, string, int, boolean
'name' => 'meta_keyword', // unique name for field
'label' => 'Meta Keyword', // you know what label it is
'rules' => 'required', // validation rule of laravel
'rules' => 'nullable', // validation rule of laravel
'class' => '', // any class for input
'value' => 'Web Application, web app, Laravel, Laravel starter, Bootstrap, Admin, Template, Open Source, nasir khan saikat, nasirkhansaikat', // default value if you want
],
Expand All @@ -191,7 +191,7 @@
'data' => 'text', // data type, string, int, boolean
'name' => 'meta_fb_app_id', // unique name for field
'label' => 'Meta Facebook App Id', // you know what label it is
'rules' => '', // validation rule of laravel
'rules' => 'nullable', // validation rule of laravel
'class' => '', // any class for input
'value' => '569561286532601', // default value if you want
],
Expand All @@ -200,7 +200,7 @@
'data' => 'text', // data type, string, int, boolean
'name' => 'meta_twitter_site', // unique name for field
'label' => 'Meta Twitter Site Account', // you know what label it is
'rules' => '', // validation rule of laravel
'rules' => 'nullable', // validation rule of laravel
'class' => '', // any class for input
'value' => '@nasirkhansaikat', // default value if you want
],
Expand All @@ -209,7 +209,7 @@
'data' => 'text', // data type, string, int, boolean
'name' => 'meta_twitter_creator', // unique name for field
'label' => 'Meta Twitter Creator Account', // you know what label it is
'rules' => '', // validation rule of laravel
'rules' => 'nullable', // validation rule of laravel
'class' => '', // any class for input
'value' => '@nasirkhansaikat', // default value if you want
],
Expand All @@ -226,7 +226,7 @@
'data' => 'text', // data type, string, int, boolean
'name' => 'google_analytics', // unique name for field
'label' => 'Google Analytics (gtag)', // you know what label it is
'rules' => '', // validation rule of laravel
'rules' => 'nullable', // validation rule of laravel
'class' => '', // any class for input
'value' => 'G-ABCDE12345', // default value if you want
'help' => 'Paste the only the Measurement Id of Google Analytics stream.', // Help text for the input field.
Expand All @@ -245,7 +245,7 @@
'data' => 'string', // data type, string, int, boolean
'name' => 'custom_css_block', // unique name for field
'label' => 'Custom Css Code', // you know what label it is
'rules' => '', // validation rule of laravel
'rules' => 'nullable', // validation rule of laravel
'class' => '', // any class for input
'value' => '', // default value if you want
'help' => 'Paste the code in this field.', // Help text for the input field.
Expand Down

0 comments on commit 68657c2

Please sign in to comment.