feat: account verified on posst
This commit is contained in:
parent
8c3fa961a0
commit
f7e72af3b2
|
|
@ -201,21 +201,13 @@ class MealPostController extends Controller
|
|||
private function loadMealPostForResponse(MealPosts $mealPost, Request $request): MealPosts
|
||||
{
|
||||
return $mealPost
|
||||
->loadMissing('user:id,name,avatar_url', 'ingredients')
|
||||
->loadCount('likedByUsers')
|
||||
->loadExists([
|
||||
'likedByUsers as liked_by_current_user' => fn (Builder $query): Builder => $query->whereKey($request->user()->getKey()),
|
||||
]);
|
||||
->loadMissing('user:id,name,avatar_url,account_verified_at', 'ingredients');
|
||||
}
|
||||
|
||||
private function mealPostListQuery(Request $request): Builder
|
||||
{
|
||||
return MealPosts::query()
|
||||
->with('user:id,name,avatar_url')
|
||||
->withCount('likedByUsers')
|
||||
->withExists([
|
||||
'likedByUsers as liked_by_current_user' => fn (Builder $query): Builder => $query->whereKey($request->user()->getKey()),
|
||||
]);
|
||||
->with('user:id,name,avatar_url,account_verified_at');
|
||||
}
|
||||
|
||||
private function getValidatedDataWithImageUrl(MealPostsRequest $request): array
|
||||
|
|
|
|||
Loading…
Reference in New Issue