Skip to content

Commit

Permalink
レコメンドAPIが会社名を返すように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
kyoya0819 committed Aug 29, 2024
1 parent 8602c7a commit 94d3f6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function __invoke(Request $request): JsonResponse
return [
"title" => $press_release->title,
"summary" => $press_release->summary,
"company_name" => $press_release->company->name,
"url" => route(
"press-release.redirect",
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static function run(
int $take = 20
): Collection
{
return PressRelease::when($mode !== "neutral", function ($query) use ($user_id, $mode) {
return PressRelease::with("company")->when($mode !== "neutral", function ($query) use ($user_id, $mode) {
$query->whereHas("keywords.view_histories", function ($query) use ($user_id, $mode) {
$query->where("user_id", $user_id)
->when($mode === "love", function ($query) {
Expand Down

0 comments on commit 94d3f6c

Please sign in to comment.