I think that's not the best practice. You could send data to view like return view('flight')->with('tripID', $tripID)->with('tripName', $chatripNamet);
and then in the view you can access data like {{ tripName }}
and {{ tripID }}
.
Take a look here https://laravel.com/docs/5.4/views#passing-data-to-views
I hope this will help you.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community