Skip to content

Commit

Permalink
feat: don't use the concat operator often
Browse files Browse the repository at this point in the history
  • Loading branch information
oskardotglobal committed Jul 31, 2024
1 parent 97ee32c commit 8e83070
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/Http/Resources/BookResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ public static function transform($record): object
]),

"tags" => $record->tags
->map(fn($tag) => "#" . $tag->name)
->map(fn($tag) => "#$tag->name")
->implode(", "),

"series" => $record->serieses->first() !== null ? "Book $record->series_index of " . $record->serieses->first()->name : null,
"series" => $record->serieses->first() !== null ? "Book $record->series_index of {$record->serieses->first()->name}" : null,
"title" => $record->title,
"cover" => "/content/$record->path/cover.jpg",
"id" => $record->id,
Expand Down
2 changes: 1 addition & 1 deletion app/View/Pages/SeriesPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected function _render(Request $request): View|Closure|string

return view("books", [
"books" => BookResource::collection($books),
"title" => "Books in " . $series->name,
"title" => "Books in $series->name",
]);
}
}
2 changes: 1 addition & 1 deletion app/View/Pages/ShelfPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected function _render(Request $request): View|Closure|string

return view("books", [
"books" => BookResource::collection($books),
"title" => "Books in shelf " . $shelf->name,
"title" => "Books in shelf $shelf->name",
]);
}
}
2 changes: 1 addition & 1 deletion resources/views/admin/users.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@foreach($users as $user)
<tr>
<td class="font-bold text-card-foreground">{{ $user->name }}</td>
<td class="text-muted-foreground">{{ "@" . $user->username }}</td>
<td class="text-muted-foreground">{{ "@$user->username" }}</td>
<td>
<div class="flex items-center gap-2">
<button
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/header.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class="uk-search-input"
<form class="flex items-center gap-4" method="POST" action="{{ route("logout") }}">
@csrf

<button type="submit" class="text-primary-foreground hover:underline">{{ "@" . $username }}</button>
<button type="submit" class="text-primary-foreground hover:underline">{{ "@$username" }}</button>
<img class="w-8 h-8 border" src="{{ route("identicon", $username) }}" alt="{{ $username }}">
</form>

Expand Down

0 comments on commit 8e83070

Please sign in to comment.