samedi 25 avril 2020

How to give order query when using scorp

I'm trying to get image data. giving order by id desc. I add orderBy sentece after get() it didn't work. Could you teach me how to add order query when using :: scope?

public function index()
    {
        $images = ImageGallery::get()->orderBy('id', 'desc');
        return view('image-gallery',compact('images'));
    }


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Kw2ZxY
via IFTTT

Aucun commentaire:

Enregistrer un commentaire