laravel eloquent order by date code example
Example 1: $tmpmembershipfee = MembershipFee::orderBy('created_at','DESC') ->first();
$tmpmembershipfee = MembershipFee::orderBy('created_at','DESC')->first();
Example 2: laravel collection sort by date
$sorted = $transaction->sortBy(function($col)
{
return $col;
})->values()->all();
Example 3: $tmpmembershipfee = MembershipFee::orderBy('created_at','DESC') ->first();
data:{'User':{'id':id}}