0) { $rawQuery = trim(Input::get('q')); $words = explode(' ', $rawQuery); $subTitle = trans('firefly.search_results_for', ['query' => $rawQuery]); $transactions = $searcher->searchTransactions($words); $accounts = $searcher->searchAccounts($words); $categories = $searcher->searchCategories($words); $budgets = $searcher->searchBudgets($words); $tags = $searcher->searchTags($words); $result = ['transactions' => $transactions, 'accounts' => $accounts, 'categories' => $categories, 'budgets' => $budgets, 'tags' => $tags]; } return view('search.index')->with('title', 'Search')->with('subTitle', $subTitle)->with( 'mainTitleIcon', 'fa-search' )->with('query', $rawQuery)->with('result', $result); } }