mimiloca
1 week ago

How to get 4 latest data to be shown in list page?

Posted 1 week ago by mimiloca

I want to view the 4 latest data inside my view page.

 public function index()
    {
        $event = DB::select('SELECT * FROM events');
        return view('home')->with('event', $event);
    }

Please sign in or create an account to participate in this conversation.