fix workshop order

This commit is contained in:
2024-04-24 17:56:40 +10:00
parent 50de666304
commit f46dbd887b

View File

@@ -10,7 +10,7 @@ class HomeController extends Controller
public function index()
{
$posts = Post::query()->orderBy('created_at', 'desc')->limit(4)->get();
$workshops = Workshop::query()->where('starts_at', '>', now())->where('status', '!=', 'private')->orderBy('created_at', 'asc')->limit(4)->get();
$workshops = Workshop::query()->where('starts_at', '>', now())->where('status', '!=', 'private')->orderBy('starts_at', 'asc')->limit(4)->get();
return view('home', [
'posts' => $posts,