Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Facades/Modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/**
* @method static void start(array $data)
* @method static void end()
* @method static void end(array $data)
*/
class Modal extends Facade
{
Expand Down
5 changes: 3 additions & 2 deletions src/ModalRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
}
2 changes: 1 addition & 1 deletion src/Stubs/Modal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
placeholder="Enter {{ input }}" value="{{ isset(${{ input }}) ? $data->{{ input }} : old('{{ input }}')}}">
</div>
</div>
{!! Modal::end() !!}
{!! Modal::end($modal) !!}
2 changes: 2 additions & 0 deletions src/resources/views/grid/grid.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
@endif

</div>
@if($grid->shouldRenderSearchForm())
<form action="{{ $grid->getSearchUrl() }}" method="GET" id="{{ $grid->getFilterFormId() }}"></form>
@endif
<div class="table-responsive grid-wrapper">
<table class="{{ $grid->getClass() }}">
<thead class="{{ $grid->getHeaderClass() }}">
Expand Down
2 changes: 1 addition & 1 deletion src/resources/views/modal/form-sample.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
name="email" placeholder="Enter email" value="{{ isset($user) ? $user->email : old('email')}}">
</div>
</div>
{!! Modal::end() !!}
{!! Modal::end($modal) !!}