This commit is contained in:
frederikpyt 2020-08-03 09:09:53 +02:00
commit 52f71abdd5
2 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ class EventController extends Controller
public function index(Request $request)
{
$events = Event::query()->paginate($request->input("limit", 20));
$events = Event::query()->orderBY('date' , 'asc')->paginate($request->input("limit", 20));
//returns the function with events index page and a parameter of events.
//also Response::detect checks screen size to determine if user is on a computer or mobile.

View File

@ -28,7 +28,7 @@ class FeedbackController extends Controller
*/
public function index(Request $request)
{
$feedback = Feedbacks::query()->paginate($request->input("limit", 20));
$feedback = Feedbacks::query()->orderBy('created_at', 'desc')->paginate($request->input("limit", 20));
return Response::detect("feedbacks.index", [ "feedback" => $feedback ]);
}
@ -59,7 +59,7 @@ class FeedbackController extends Controller
$feedbacks = new Feedbacks($requestBody);
$feedbacks->save();
return Response::detect("root.index");
return redirect()->route("root.index");
}
/**