1
我在一個應用程序中構建了一個過濾功能,該功能將用兩個下拉菜單中的輸入過濾出數據(在同一頁上)。我希望下拉菜單能夠「記住」用戶選擇的內容並將它們保留爲默認值。我如何讓Laravel「記住」用戶上次在下拉菜單中選擇的內容?
{!! Form::open(['method' => 'GET', 'route' => ['path_filter_index']]) !!}
{!! Form::select('user', [-1 => 'All'] + $users , $users) !!}
{!! Form::select('customer', [-1 => 'All'] + $customers, $customers) !!}
{!! Form::hidden('status', 0) !!}
{!! Form::checkbox('status', 1) !!}
{!! Form::submit('Filtrera', ['class' => 'btn btn-primary btn-sm']) !!}
{!! Form::close() !!}
工程就像一個魅力!謝謝! – 2014-11-04 11:05:47