diff --git a/src/Facades/Modal.php b/src/Facades/Modal.php index bf35cce..5acce78 100644 --- a/src/Facades/Modal.php +++ b/src/Facades/Modal.php @@ -10,7 +10,7 @@ /** * @method static void start(array $data) - * @method static void end() + * @method static void end(array $data) */ class Modal extends Facade { diff --git a/src/ModalRenderer.php b/src/ModalRenderer.php index e0ac393..83fb3f7 100644 --- a/src/ModalRenderer.php +++ b/src/ModalRenderer.php @@ -22,10 +22,11 @@ public function start($data) /** * Render the modal closing section * + * @param $data * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ - public function end() + public function end($data = []) { - return view('leantony::modal.modal-partial-end'); + return view('leantony::modal.modal-partial-end', ['modal' => $data]); } } \ No newline at end of file diff --git a/src/Stubs/Modal.txt b/src/Stubs/Modal.txt index bba4d81..8e72670 100644 --- a/src/Stubs/Modal.txt +++ b/src/Stubs/Modal.txt @@ -6,4 +6,4 @@ placeholder="Enter {{ input }}" value="{{ isset(${{ input }}) ? $data->{{ input }} : old('{{ input }}')}}"> -{!! Modal::end() !!} \ No newline at end of file +{!! Modal::end($modal) !!} \ No newline at end of file diff --git a/src/resources/views/grid/grid.blade.php b/src/resources/views/grid/grid.blade.php index 481624c..e93d50f 100644 --- a/src/resources/views/grid/grid.blade.php +++ b/src/resources/views/grid/grid.blade.php @@ -16,7 +16,9 @@ @endif + @if($grid->shouldRenderSearchForm())
+ @endif
diff --git a/src/resources/views/modal/form-sample.blade.php b/src/resources/views/modal/form-sample.blade.php index 8197e0a..7933be1 100644 --- a/src/resources/views/modal/form-sample.blade.php +++ b/src/resources/views/modal/form-sample.blade.php @@ -13,4 +13,4 @@ name="email" placeholder="Enter email" value="{{ isset($user) ? $user->email : old('email')}}"> -{!! Modal::end() !!} \ No newline at end of file +{!! Modal::end($modal) !!} \ No newline at end of file