dont show private events on front page
This commit is contained in:
@@ -10,7 +10,7 @@ class HomeController extends Controller
|
|||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$posts = Post::query()->orderBy('created_at', 'desc')->limit(4)->get();
|
$posts = Post::query()->orderBy('created_at', 'desc')->limit(4)->get();
|
||||||
$workshops = Workshop::query()->where('starts_at', '>', now())->orderBy('created_at', 'asc')->limit(4)->get();
|
$workshops = Workshop::query()->where('starts_at', '>', now())->where('status', '!=', 'private')->orderBy('created_at', 'asc')->limit(4)->get();
|
||||||
|
|
||||||
return view('home', [
|
return view('home', [
|
||||||
'posts' => $posts,
|
'posts' => $posts,
|
||||||
|
|||||||
Reference in New Issue
Block a user