Skip to content

Commit

Permalink
[Update] Assets
Browse files Browse the repository at this point in the history
- Updated composer packages
- Updated npm packages
  • Loading branch information
kiritokatklian committed May 15, 2021
1 parent ed0113d commit ca7cff7
Show file tree
Hide file tree
Showing 6 changed files with 359 additions and 358 deletions.
2 changes: 1 addition & 1 deletion app/Http/Resources/AnimeStudioResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function toArray($request): array

$resource = [
'id' => $animeStudio->id,
'type' => 'studio',
'type' => 'studios',
'href' => route('api.anime.studios', $animeStudio->anime, false),
'attributes' => $animeStudio->only(['is_licensor', 'is_producer', 'is_studio']),
];
Expand Down
3 changes: 2 additions & 1 deletion app/Http/Resources/StudioResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ protected function getAnimeRelationship(?Anime $excludingAnime = null): array
$studio = $this->resource;

$whereRules = [];
if ($excludingAnime)
if ($excludingAnime) {
array_push($whereRules, ['animes.id', '!=', $excludingAnime->id]);
}

return [
'shows' => [
Expand Down
Loading

0 comments on commit ca7cff7

Please sign in to comment.