artisticre wrote a reply+100 XP
3w ago
Querying DB
Those are the id's as entered in the table. Does that make sense?
artisticre started a new conversation+100 XP
3w ago
Querying DB
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 started a new conversation+100 XP
5mos ago
Why Isn't This Passing? I am Brain Dead Today
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.