Answer the question
In order to leave comments, you need to log in
Why is the view not showing in Laravel?
Route:
Route::post('clients/registration', '[email protected]');
class ClientController extends Controller
{
function findAction(Request $request)
{
if($request['action'] == 'searchFlights') $this->searchFlights($request);
if($request['action'] == 'informationFlight') $this->informationFlight($request['id']);
if($request['action'] == 'registrationClient') $this->registrationClient($request);
}
function searchFlights(Request $request)
{
if($request['departure'] == '') $request['departure'] = '%';
if($request['arrival'] == '') $request['arrival'] = '%';
if($request['departure_date'] == '') $request['departure_date'] = '%';
$serchResults = DB::table('flight')
->where('departure', 'LIKE', $request['departure'])
->where('arrival', 'LIKE', $request['arrival'])
->where('departure_date', 'LIKE', $request['departure_date'])
->get();
return \View::make('pages.clients.registration', ['searchResults' => $serchResults, 'searchValue' => $request]);
}
function informationFlight($id)
{
$informationFlight = DB::table('flight')
->where('id', '=', $id)
->get();
return \View::make('pages.clients.registration', ['informationFlight' => $informationFlight, 'registrationFlag' => true]);
}
function registrationClient()
{
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question