Fix invoice Search auto redirect
This commit is contained in:
parent
ce6fcd7f83
commit
1fd09c6bec
1 changed files with 1 additions and 1 deletions
|
|
@ -54,7 +54,7 @@ class InvoiceController extends Controller
|
|||
if ($request->ajax()) {
|
||||
return $view;
|
||||
}
|
||||
if (($models = $view->getData()['models'])->count() === 1) {
|
||||
if ($request->search and ($models = $view->getData()['models'])->count() === 1) {
|
||||
return \redirect()->route('invoices.edit', $models->first());
|
||||
}
|
||||
return view('invoices.index', $view->getData());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue