From fc2f672ac87e20a12935b78dd5a84d8d75ef1843 Mon Sep 17 00:00:00 2001 From: Samuel De Backer Date: Thu, 12 Mar 2015 23:35:02 +0100 Subject: [PATCH] checkboxes --- src/Http/Requests/FormRequest.php | 19 ------------------- src/resources/views/admin/_form.blade.php | 2 ++ 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/src/Http/Requests/FormRequest.php b/src/Http/Requests/FormRequest.php index 8f8e1d3..93bf512 100644 --- a/src/Http/Requests/FormRequest.php +++ b/src/Http/Requests/FormRequest.php @@ -16,23 +16,4 @@ public function rules() } return $rules; } - - /** - * Sanitize inputs - * - * @return array - */ - public function sanitize() - { - $input = $this->all(); - - // Checkboxes - $input['homepage'] = $this->has('homepage'); - foreach (config('translatable.locales') as $locale) { - $input[$locale]['status'] = $this->has($locale . '.status'); - } - - $this->replace($input); - return $this->all(); - } } diff --git a/src/resources/views/admin/_form.blade.php b/src/resources/views/admin/_form.blade.php index 62b9a5e..a4e66b5 100644 --- a/src/resources/views/admin/_form.blade.php +++ b/src/resources/views/admin/_form.blade.php @@ -18,6 +18,7 @@
+ {!! BootForm::checkbox(trans('validation.attributes.homepage'), 'homepage') !!}
@@ -30,6 +31,7 @@
@include('core::form._title-and-slug') + {!! BootForm::checkbox(trans('validation.attributes.online'), $lang.'[status]') !!} {!! BootForm::text(trans('validation.attributes.website'), $lang.'[website]') !!} {!! BootForm::textarea(trans('validation.attributes.summary'), $lang.'[summary]')->rows(4) !!}