artisticre's avatar

artisticre wrote a reply+100 XP

10h ago

Those are the id's as entered in the table. Does that make sense?

artisticre's avatar

artisticre started a new conversation+100 XP

11h ago

I am not sure how to query the database based on what I want. If I had a table in my blade view I want to query the database by id as follows

9 10 11 12
5 6 7 8
1 2 3 4

But it is querying like

12 11 10 9
8 7 6 5
1 2 3 4 
```
```
        $completed = CompletedWeekend::orderBy('id', 'desc')->get();

```
artisticre's avatar

artisticre started a new conversation+100 XP

4mos ago

Controller

public function ourHistory()
    {
        $metaTitle = 'Title';
        $metaDescription = 'descriptio';
        $history = OurHistory::latest()->get();
        return view('pages.our-history',compact('history','metaTitle','metaDescription'));
    }

blade

{{$history}} shows all details in the database but if I change to {{$history->pagetitle}} (one of the columns in the database) says Property [pagetitle] does not exist on this collection instance.