skip to Main Content

How to pass action to Laravel 8 routes?

I was using following Route declaration to pass language action to the routes. Route::get('/de', ['uses' => 'PageController@showHomepage', 'language' => 'de']); And in controller, I was able to get this value like this: $action = $request->route()->getAction(); // $action['language'] gives the given…

VIEW QUESTION

How to sort multiple foreach from laravel blade

I have 2 different tables data has order_id and I want to sort it in laravel blade foreach. My Controller: $questions = Question::where('quiz_id', $quiz->id)->orderBy('order_id', 'asc')->get(); $explanations = Explanations::where('quiz_id', $quiz->id)->orderBy('order_id', 'asc')->get(); My Blade: (I want to sort this 2 foreach by…

VIEW QUESTION
Back To Top
Search