You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I unpublish a post and try to access it via url, the code breaks on $categories = $blogPost->post->categories()->with([ 'categoryTranslations' => function ($query) use ($request) { $query->where("lang_id", '=', $request->get("lang_id")); } ])->get();
because $blogPost->post is null. Would be nice if this was handled and an exception was thrown or a 404 page was returned.
The text was updated successfully, but these errors were encountered:
When I unpublish a post and try to access it via url, the code breaks on
$categories = $blogPost->post->categories()->with([ 'categoryTranslations' => function ($query) use ($request) { $query->where("lang_id", '=', $request->get("lang_id")); } ])->get();
because $blogPost->post is null. Would be nice if this was handled and an exception was thrown or a 404 page was returned.
The text was updated successfully, but these errors were encountered: