repo
stringlengths
7
63
file_url
stringlengths
81
284
file_path
stringlengths
5
200
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:02:33
2026-01-05 05:24:06
truncated
bool
2 classes
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/iTunes/ITunesConnector.php
app/Http/Integrations/iTunes/ITunesConnector.php
<?php namespace App\Http\Integrations\iTunes; use Saloon\Http\Connector; use Saloon\Traits\Plugins\AcceptsJson; use Saloon\Traits\Plugins\AlwaysThrowOnErrors; class ITunesConnector extends Connector { use AcceptsJson; use AlwaysThrowOnErrors; public function resolveBaseUrl(): string { return...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/iTunes/Requests/GetTrackRequest.php
app/Http/Integrations/iTunes/Requests/GetTrackRequest.php
<?php namespace App\Http\Integrations\iTunes\Requests; use App\Models\Album; use App\Models\Artist; use Saloon\Enums\Method; use Saloon\Http\Request; class GetTrackRequest extends Request { protected Method $method = Method::GET; public function __construct(private readonly string $trackName, private readon...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/Wikidata/WikidataConnector.php
app/Http/Integrations/Wikidata/WikidataConnector.php
<?php namespace App\Http\Integrations\Wikidata; use Saloon\Http\Connector; class WikidataConnector extends Connector { public function resolveBaseUrl(): string { return 'https://www.wikidata.org/wiki/'; } /** @inheritdoc */ protected function defaultHeaders(): array { return ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/Wikidata/Requests/GetEntityDataRequest.php
app/Http/Integrations/Wikidata/Requests/GetEntityDataRequest.php
<?php namespace App\Http\Integrations\Wikidata\Requests; use Saloon\Enums\Method; use Saloon\Http\Request; class GetEntityDataRequest extends Request { protected Method $method = Method::GET; public function __construct(private readonly string $entityId) { } public function resolveEndpoint(): s...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/Spotify/SpotifyClient.php
app/Http/Integrations/Spotify/SpotifyClient.php
<?php namespace App\Http\Integrations\Spotify; use App\Exceptions\SpotifyIntegrationDisabledException; use App\Services\SpotifyService; use Illuminate\Cache\Repository as Cache; use SpotifyWebAPI\Session; use SpotifyWebAPI\SpotifyWebAPI; /** * @method array search(string $keywords, string|array $type, array|object ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/Lastfm/LastfmConnector.php
app/Http/Integrations/Lastfm/LastfmConnector.php
<?php namespace App\Http\Integrations\Lastfm; use App\Http\Integrations\Lastfm\Auth\LastfmAuthenticator; use Saloon\Http\Connector; use Saloon\Traits\Plugins\AcceptsJson; class LastfmConnector extends Connector { use AcceptsJson; public function resolveBaseUrl(): string { return config('koel.ser...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/Lastfm/Requests/GetAlbumInfoRequest.php
app/Http/Integrations/Lastfm/Requests/GetAlbumInfoRequest.php
<?php namespace App\Http\Integrations\Lastfm\Requests; use App\Http\Integrations\Lastfm\Concerns\FormatsLastFmText; use App\Models\Album; use App\Values\Album\AlbumInformation; use Illuminate\Support\Arr; use Saloon\Enums\Method; use Saloon\Http\Request; use Saloon\Http\Response; final class GetAlbumInfoRequest exte...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/Lastfm/Requests/UpdateNowPlayingRequest.php
app/Http/Integrations/Lastfm/Requests/UpdateNowPlayingRequest.php
<?php namespace App\Http\Integrations\Lastfm\Requests; use App\Http\Integrations\Lastfm\Contracts\RequiresSignature; use App\Models\Album; use App\Models\Song; use App\Models\User; use Saloon\Contracts\Body\HasBody; use Saloon\Enums\Method; use Saloon\Http\Request; use Saloon\Traits\Body\HasFormBody; final class Upd...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/Lastfm/Requests/ToggleLoveTrackRequest.php
app/Http/Integrations/Lastfm/Requests/ToggleLoveTrackRequest.php
<?php namespace App\Http\Integrations\Lastfm\Requests; use App\Http\Integrations\Lastfm\Contracts\RequiresSignature; use App\Models\Song; use App\Models\User; use Saloon\Contracts\Body\HasBody; use Saloon\Enums\Method; use Saloon\Http\Request; use Saloon\Traits\Body\HasFormBody; final class ToggleLoveTrackRequest ex...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/Lastfm/Requests/GetArtistInfoRequest.php
app/Http/Integrations/Lastfm/Requests/GetArtistInfoRequest.php
<?php namespace App\Http\Integrations\Lastfm\Requests; use App\Http\Integrations\Lastfm\Concerns\FormatsLastFmText; use App\Models\Artist; use App\Values\Artist\ArtistInformation; use Saloon\Enums\Method; use Saloon\Http\Request; use Saloon\Http\Response; final class GetArtistInfoRequest extends Request { use Fo...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/Lastfm/Requests/GetSessionKeyRequest.php
app/Http/Integrations/Lastfm/Requests/GetSessionKeyRequest.php
<?php namespace App\Http\Integrations\Lastfm\Requests; use App\Http\Integrations\Lastfm\Contracts\RequiresSignature; use Saloon\Enums\Method; use Saloon\Http\Request; final class GetSessionKeyRequest extends Request implements RequiresSignature { protected Method $method = Method::GET; public function __con...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/Lastfm/Requests/ScrobbleRequest.php
app/Http/Integrations/Lastfm/Requests/ScrobbleRequest.php
<?php namespace App\Http\Integrations\Lastfm\Requests; use App\Http\Integrations\Lastfm\Contracts\RequiresSignature; use App\Models\Album; use App\Models\Song; use App\Models\User; use Saloon\Contracts\Body\HasBody; use Saloon\Enums\Method; use Saloon\Http\Request; use Saloon\Traits\Body\HasFormBody; final class Scr...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/Lastfm/Auth/LastfmAuthenticator.php
app/Http/Integrations/Lastfm/Auth/LastfmAuthenticator.php
<?php namespace App\Http\Integrations\Lastfm\Auth; use App\Http\Integrations\Lastfm\Contracts\RequiresSignature; use Saloon\Contracts\Authenticator; use Saloon\Http\PendingRequest; use Saloon\Repositories\Body\FormBodyRepository; final class LastfmAuthenticator implements Authenticator { public function __constr...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/Lastfm/Contracts/RequiresSignature.php
app/Http/Integrations/Lastfm/Contracts/RequiresSignature.php
<?php namespace App\Http\Integrations\Lastfm\Contracts; interface RequiresSignature { }
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/Lastfm/Concerns/FormatsLastFmText.php
app/Http/Integrations/Lastfm/Concerns/FormatsLastFmText.php
<?php namespace App\Http\Integrations\Lastfm\Concerns; trait FormatsLastFmText { /** * Correctly format a value returned by Last.fm. */ private static function formatLastFmText(?string $value): string { $artifacts = [ 'Read more on Last.fm.', 'Read more on Last.fm...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/YouTube/YouTubeConnector.php
app/Http/Integrations/YouTube/YouTubeConnector.php
<?php namespace App\Http\Integrations\YouTube; use Saloon\Http\Auth\QueryAuthenticator; use Saloon\Http\Connector; use Saloon\Traits\Plugins\AcceptsJson; class YouTubeConnector extends Connector { use AcceptsJson; public function resolveBaseUrl(): string { return config('koel.services.youtube.en...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/YouTube/Requests/SearchVideosRequest.php
app/Http/Integrations/YouTube/Requests/SearchVideosRequest.php
<?php namespace App\Http\Integrations\YouTube\Requests; use App\Models\Song; use Saloon\Enums\Method; use Saloon\Http\Request; class SearchVideosRequest extends Request { protected Method $method = Method::GET; public function __construct(private readonly Song $song, private readonly string $pageToken = '')...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/Wikipedia/WikipediaConnector.php
app/Http/Integrations/Wikipedia/WikipediaConnector.php
<?php namespace App\Http\Integrations\Wikipedia; use Saloon\Http\Connector; class WikipediaConnector extends Connector { public function resolveBaseUrl(): string { return 'https://en.wikipedia.org/api/rest_v1/'; } /** @inheritdoc */ protected function defaultHeaders(): array { ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/Wikipedia/Requests/GetPageSummaryRequest.php
app/Http/Integrations/Wikipedia/Requests/GetPageSummaryRequest.php
<?php namespace App\Http\Integrations\Wikipedia\Requests; use Saloon\Enums\Method; use Saloon\Http\Request; class GetPageSummaryRequest extends Request { protected Method $method = Method::GET; public function __construct(private readonly string $pageTitle) { } public function resolveEndpoint()...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/MusicBrainz/MusicBrainzConnector.php
app/Http/Integrations/MusicBrainz/MusicBrainzConnector.php
<?php namespace App\Http\Integrations\MusicBrainz; use Saloon\Http\Connector; use Saloon\Traits\Plugins\AcceptsJson; class MusicBrainzConnector extends Connector { use AcceptsJson; public function resolveBaseUrl(): string { return config('koel.services.musicbrainz.endpoint'); } /** @inh...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/MusicBrainz/Requests/SearchForArtistRequest.php
app/Http/Integrations/MusicBrainz/Requests/SearchForArtistRequest.php
<?php namespace App\Http\Integrations\MusicBrainz\Requests; use Saloon\Enums\Method; use Saloon\Http\Request; class SearchForArtistRequest extends Request { protected Method $method = Method::GET; public function __construct(private readonly string $name) { } public function resolveEndpoint(): ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/MusicBrainz/Requests/GetRecordingsRequest.php
app/Http/Integrations/MusicBrainz/Requests/GetRecordingsRequest.php
<?php namespace App\Http\Integrations\MusicBrainz\Requests; use Saloon\Enums\Method; use Saloon\Http\Request; class GetRecordingsRequest extends Request { protected Method $method = Method::GET; public function __construct(private readonly string $mbid) { } public function resolveEndpoint(): st...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/MusicBrainz/Requests/GetArtistUrlRelationshipsRequest.php
app/Http/Integrations/MusicBrainz/Requests/GetArtistUrlRelationshipsRequest.php
<?php namespace App\Http\Integrations\MusicBrainz\Requests; use Saloon\Enums\Method; use Saloon\Http\Request; class GetArtistUrlRelationshipsRequest extends Request { protected Method $method = Method::GET; public function __construct(private readonly string $mbid) { } public function resolveEn...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/MusicBrainz/Requests/GetReleaseGroupUrlRelationshipsRequest.php
app/Http/Integrations/MusicBrainz/Requests/GetReleaseGroupUrlRelationshipsRequest.php
<?php namespace App\Http\Integrations\MusicBrainz\Requests; use Saloon\Enums\Method; use Saloon\Http\Request; class GetReleaseGroupUrlRelationshipsRequest extends Request { protected Method $method = Method::GET; public function __construct(private readonly string $mbid) { } public function res...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Integrations/MusicBrainz/Requests/SearchForReleaseRequest.php
app/Http/Integrations/MusicBrainz/Requests/SearchForReleaseRequest.php
<?php namespace App\Http\Integrations\MusicBrainz\Requests; use Saloon\Enums\Method; use Saloon\Http\Request; class SearchForReleaseRequest extends Request { protected Method $method = Method::GET; public function __construct(private readonly string $albumName, private readonly string $artistName) { ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/CollaborativeSongResourceCollection.php
app/Http/Resources/CollaborativeSongResourceCollection.php
<?php namespace App\Http\Resources; class CollaborativeSongResourceCollection extends SongResourceCollection { /** @inheritdoc */ public function toArray($request): array { $user = $this->user ?? auth()->user(); return $this->collection->map( static fn (CollaborativeSongResour...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/SongFileResource.php
app/Http/Resources/SongFileResource.php
<?php namespace App\Http\Resources; use App\Enums\SongStorageType; use App\Models\Song; use Webmozart\Assert\Assert; class SongFileResource extends SongResource { public const JSON_STRUCTURE = [ 'type', 'id', 'title', 'lyrics', 'album_id', 'album_name', 'ar...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/CollaborativeSongResource.php
app/Http/Resources/CollaborativeSongResource.php
<?php namespace App\Http\Resources; use App\Values\Playlist\PlaylistCollaborator; use Carbon\Carbon; class CollaborativeSongResource extends SongResource { public const JSON_STRUCTURE = SongResource::JSON_STRUCTURE + [ 'collaboration' => [ 'user' => PlaylistCollaboratorResource::JSON_STRUCTUR...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/PodcastResource.php
app/Http/Resources/PodcastResource.php
<?php namespace App\Http\Resources; use App\Models\Podcast; use App\Models\PodcastUserPivot; use App\Models\User; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; class PodcastResource extends JsonResource { public const JSON_STRUCTURE = [ 'type', 'id', 'url',...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/QueueStateResource.php
app/Http/Resources/QueueStateResource.php
<?php namespace App\Http\Resources; use App\Values\QueueState; use Illuminate\Http\Resources\Json\JsonResource; class QueueStateResource extends JsonResource { public const JSON_STRUCTURE = [ 'songs' => [ SongResource::JSON_STRUCTURE, ], 'current_song', 'playback_posit...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/PlaylistResource.php
app/Http/Resources/PlaylistResource.php
<?php namespace App\Http\Resources; use App\Models\Playlist; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; class PlaylistResource extends JsonResource { public const JSON_STRUCTURE = [ 'type', 'id', 'name', 'description', 'folder_id', ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/ThemeResource.php
app/Http/Resources/ThemeResource.php
<?php namespace App\Http\Resources; use App\Models\Theme; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; class ThemeResource extends JsonResource { public const JSON_STRUCTURE = [ 'type', 'id', 'name', 'thumbnail_color', 'thumbnail_image', ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/PlaylistCollaborationTokenResource.php
app/Http/Resources/PlaylistCollaborationTokenResource.php
<?php namespace App\Http\Resources; use App\Models\PlaylistCollaborationToken; use Illuminate\Http\Resources\Json\JsonResource; class PlaylistCollaborationTokenResource extends JsonResource { public const JSON_STRUCTURE = [ 'type', 'token', ]; public function __construct(private readonly...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/SongResource.php
app/Http/Resources/SongResource.php
<?php namespace App\Http\Resources; use App\Facades\License; use App\Models\Song; use App\Models\User; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; use Illuminate\Support\Facades\URL; use Illuminate\Support\Str; class SongResource extends JsonResource { public const JSON_STRUCTUR...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/ResourcePermissionResource.php
app/Http/Resources/ResourcePermissionResource.php
<?php namespace App\Http\Resources; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; class ResourcePermissionResource extends JsonResource { public function __construct( private readonly string $type, private readonly string|int $id, private readonly string $a...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/ArtistResource.php
app/Http/Resources/ArtistResource.php
<?php namespace App\Http\Resources; use App\Facades\License; use App\Models\Artist; use App\Models\User; use Illuminate\Http\Resources\Json\JsonResource; class ArtistResource extends JsonResource { public const JSON_STRUCTURE = [ 'type', 'id', 'name', 'image', 'created_at'...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/UserResource.php
app/Http/Resources/UserResource.php
<?php namespace App\Http\Resources; use App\Enums\Acl\Role; use App\Models\User; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; class UserResource extends JsonResource { public const JSON_STRUCTURE = [ 'type', 'id', 'name', 'email', 'avatar',...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/SongFileResourceCollection.php
app/Http/Resources/SongFileResourceCollection.php
<?php namespace App\Http\Resources; class SongFileResourceCollection extends SongResourceCollection { /** @inheritdoc */ public function toArray($request): array { $user = $this->user ?? auth()->user(); return $this->collection->map(static fn (SongFileResource $resource) => $resource->for...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/EmbedOptionsResource.php
app/Http/Resources/EmbedOptionsResource.php
<?php namespace App\Http\Resources; use App\Values\EmbedOptions; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; class EmbedOptionsResource extends JsonResource { public const JSON_STRUCTURE = [ 'type', 'theme', 'layout', 'preview', ]; public...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/ExcerptSearchResource.php
app/Http/Resources/ExcerptSearchResource.php
<?php namespace App\Http\Resources; use App\Values\ExcerptSearchResult; use Illuminate\Http\Resources\Json\JsonResource; class ExcerptSearchResource extends JsonResource { public const JSON_STRUCTURE = [ 'songs' => [ SongResource::JSON_STRUCTURE, ], 'artists' => [ ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/GenreResource.php
app/Http/Resources/GenreResource.php
<?php namespace App\Http\Resources; use App\Values\GenreSummary; use Illuminate\Http\Resources\Json\JsonResource; class GenreResource extends JsonResource { public const JSON_STRUCTURE = [ 'type', 'id', 'name', ]; public function __construct(private readonly GenreSummary $summary...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/PodcastResourceCollection.php
app/Http/Resources/PodcastResourceCollection.php
<?php namespace App\Http\Resources; use App\Models\Podcast; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\ResourceCollection; use Illuminate\Support\Collection; class PodcastResourceCollection extends ResourceCollection { public function __construct( private readonly Collection $podcast...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/FolderResource.php
app/Http/Resources/FolderResource.php
<?php namespace App\Http\Resources; use App\Models\Folder; use Illuminate\Http\Resources\Json\JsonResource; class FolderResource extends JsonResource { public const JSON_STRUCTURE = [ 'type', 'id', 'path', 'name', ]; public function __construct(private readonly Folder $fo...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/EmbedResource.php
app/Http/Resources/EmbedResource.php
<?php namespace App\Http\Resources; use App\Enums\EmbeddableType; use App\Models\Embed; use Illuminate\Database\Eloquent\Collection; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; class EmbedResource extends JsonResource { public const JSON_STRUCTURE = [ 'type', 'id...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/FavoriteResource.php
app/Http/Resources/FavoriteResource.php
<?php namespace App\Http\Resources; use App\Models\Favorite; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; class FavoriteResource extends JsonResource { public const JSON_STRUCTURE = [ 'type', 'favoriteable_type', 'favoriteable_id', 'user_id', ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/LiveEventResource.php
app/Http/Resources/LiveEventResource.php
<?php namespace App\Http\Resources; use App\Values\Ticketmaster\TicketmasterEvent; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; class LiveEventResource extends JsonResource { public const JSON_STRUCTURE = [ 'type', 'id', 'name', 'dates' => [ ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/UserProspectResource.php
app/Http/Resources/UserProspectResource.php
<?php namespace App\Http\Resources; use App\Models\User; use Illuminate\Http\Resources\Json\JsonResource; class UserProspectResource extends JsonResource { public const JSON_STRUCTURE = [ 'type', 'id', 'name', 'email', 'avatar', 'role', 'is_prospect', ]...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/InteractionResource.php
app/Http/Resources/InteractionResource.php
<?php namespace App\Http\Resources; use App\Models\Interaction; use Illuminate\Http\Resources\Json\JsonResource; class InteractionResource extends JsonResource { public const JSON_STRUCTURE = [ 'type', 'id', 'songId', 'song_id', 'playCount', 'play_count', ]; ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/PodcastCategoryResource.php
app/Http/Resources/PodcastCategoryResource.php
<?php namespace App\Http\Resources; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; use PhanAn\Poddle\Values\Category; class PodcastCategoryResource extends JsonResource { public function __construct(private readonly Category $category) { parent::__construct($this->categ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/PlaylistCollaboratorResource.php
app/Http/Resources/PlaylistCollaboratorResource.php
<?php namespace App\Http\Resources; use App\Values\Playlist\PlaylistCollaborator; use Illuminate\Http\Resources\Json\JsonResource; class PlaylistCollaboratorResource extends JsonResource { public const JSON_STRUCTURE = [ 'type', 'id', 'name', 'avatar', ]; public function ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/AlbumResource.php
app/Http/Resources/AlbumResource.php
<?php namespace App\Http\Resources; use App\Facades\License; use App\Models\Album; use App\Models\User; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; class AlbumResource extends JsonResource { public const JSON_STRUCTURE = [ 'type', 'id', 'name', 'a...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/SongResourceCollection.php
app/Http/Resources/SongResourceCollection.php
<?php namespace App\Http\Resources; use App\Models\User; use Illuminate\Http\Resources\Json\ResourceCollection; class SongResourceCollection extends ResourceCollection { protected ?User $user; public function for(?User $user): static { $this->user = $user; return $this; } /** @...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/PlaylistFolderResource.php
app/Http/Resources/PlaylistFolderResource.php
<?php namespace App\Http\Resources; use App\Models\PlaylistFolder; use Illuminate\Http\Resources\Json\JsonResource; class PlaylistFolderResource extends JsonResource { public const JSON_STRUCTURE = [ 'type', 'id', 'name', 'user_id', 'created_at', ]; public functio...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Http/Resources/RadioStationResource.php
app/Http/Resources/RadioStationResource.php
<?php namespace App\Http\Resources; use App\Models\RadioStation; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; class RadioStationResource extends JsonResource { public const JSON_STRUCTURE = [ 'type', 'name', 'id', 'url', 'logo', 'de...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Mail/UserInvite.php
app/Mail/UserInvite.php
<?php namespace App\Mail; use App\Models\User; use Illuminate\Bus\Queueable; use Illuminate\Mail\Mailable; use Illuminate\Mail\Mailables\Content; use Illuminate\Mail\Mailables\Envelope; use Illuminate\Queue\SerializesModels; class UserInvite extends Mailable { use Queueable; use SerializesModels; public...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Filesystems/DropboxFilesystem.php
app/Filesystems/DropboxFilesystem.php
<?php namespace App\Filesystems; use DateTimeInterface; use League\Flysystem\Filesystem; use Spatie\FlysystemDropbox\DropboxAdapter; class DropboxFilesystem extends Filesystem { public function __construct(private readonly DropboxAdapter $adapter) { parent::__construct($adapter, ['case_sensitive' => ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Casts/SmartPlaylistRulesCast.php
app/Casts/SmartPlaylistRulesCast.php
<?php namespace App\Casts; use App\Values\SmartPlaylist\SmartPlaylistRuleGroupCollection; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; class SmartPlaylistRulesCast implements CastsAttributes { public function get($model, string $key, $value, array $attributes): ?SmartPlaylistRuleGroupCollection ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Casts/EncryptedValueCast.php
app/Casts/EncryptedValueCast.php
<?php namespace App\Casts; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; use Illuminate\Support\Facades\Crypt; class EncryptedValueCast implements CastsAttributes { public function get($model, string $key, $value, array $attributes): ?string { return $value ? Crypt::decrypt($value) : nu...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Casts/LicenseMetaCast.php
app/Casts/LicenseMetaCast.php
<?php namespace App\Casts; use App\Values\License\LicenseMeta; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; use Illuminate\Support\Facades\Log; use Throwable; class LicenseMetaCast implements CastsAttributes { public function get($model, string $key, $value, array $attributes): ?LicenseMeta { ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Casts/UserPreferencesCast.php
app/Casts/UserPreferencesCast.php
<?php namespace App\Casts; use App\Values\User\UserPreferences; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; class UserPreferencesCast implements CastsAttributes { public function get($model, string $key, $value, array $attributes): UserPreferences { return UserPreferences::fromArray(j...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Casts/SongTitleCast.php
app/Casts/SongTitleCast.php
<?php namespace App\Casts; use App\Models\Song; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; use Illuminate\Database\Eloquent\Model; class SongTitleCast implements CastsAttributes { /** * @param Song $model * @param string|null $value */ public function get(Model $model, string ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Casts/SongLyricsCast.php
app/Casts/SongLyricsCast.php
<?php namespace App\Casts; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; use Illuminate\Database\Eloquent\Model; class SongLyricsCast implements CastsAttributes { /** @param string|null $value */ public function get(Model $model, string $key, mixed $value, array $attributes): string { ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Casts/SongStorageCast.php
app/Casts/SongStorageCast.php
<?php namespace App\Casts; use App\Enums\SongStorageType; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; use Illuminate\Database\Eloquent\Model; class SongStorageCast implements CastsAttributes { /** @param string|null $value */ public function get(Model $model, string $key, mixed $value, array ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Casts/LicenseInstanceCast.php
app/Casts/LicenseInstanceCast.php
<?php namespace App\Casts; use App\Values\License\LicenseInstance; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; use Illuminate\Support\Facades\Log; use Throwable; class LicenseInstanceCast implements CastsAttributes { public function get($model, string $key, $value, array $attributes): ?LicenseIns...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Casts/ThemePropertiesCast.php
app/Casts/ThemePropertiesCast.php
<?php namespace App\Casts; use App\Values\Theme\ThemeProperties; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; use Illuminate\Support\Facades\Log; use Throwable; class ThemePropertiesCast implements CastsAttributes { public function get($model, string $key, $value, array $attributes): ThemeProperti...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Casts/Podcast/EnclosureCast.php
app/Casts/Podcast/EnclosureCast.php
<?php namespace App\Casts\Podcast; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; use Illuminate\Database\Eloquent\Model; use PhanAn\Poddle\Values\Enclosure; class EnclosureCast implements CastsAttributes { public function get(Model $model, string $key, mixed $value, array $attributes): Enclosure ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Casts/Podcast/EpisodeMetadataCast.php
app/Casts/Podcast/EpisodeMetadataCast.php
<?php namespace App\Casts\Podcast; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; use Illuminate\Database\Eloquent\Model; use PhanAn\Poddle\Values\EpisodeMetadata; use Throwable; class EpisodeMetadataCast implements CastsAttributes { public function get(Model $model, string $key, mixed $value, array...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Casts/Podcast/PodcastMetadataCast.php
app/Casts/Podcast/PodcastMetadataCast.php
<?php namespace App\Casts\Podcast; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; use Illuminate\Database\Eloquent\Model; use PhanAn\Poddle\Values\ChannelMetadata; use Throwable; class PodcastMetadataCast implements CastsAttributes { public function get(Model $model, string $key, mixed $value, array...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Casts/Podcast/CategoriesCast.php
app/Casts/Podcast/CategoriesCast.php
<?php namespace App\Casts\Podcast; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; use Illuminate\Database\Eloquent\Model; use PhanAn\Poddle\Values\CategoryCollection; use Throwable; class CategoriesCast implements CastsAttributes { public function get(Model $model, string $key, mixed $value, array $...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Casts/Podcast/PodcastStateCast.php
app/Casts/Podcast/PodcastStateCast.php
<?php namespace App\Casts\Podcast; use App\Values\Podcast\PodcastState; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; use Illuminate\Database\Eloquent\Model; class PodcastStateCast implements CastsAttributes { public function get(Model $model, string $key, mixed $value, array $attributes): PodcastS...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Listeners/MakePlaylistSongsPublic.php
app/Listeners/MakePlaylistSongsPublic.php
<?php namespace App\Listeners; use App\Events\NewPlaylistCollaboratorJoined; use App\Services\PlaylistService; use Illuminate\Contracts\Queue\ShouldQueue; readonly class MakePlaylistSongsPublic implements ShouldQueue { public function __construct(private PlaylistService $service) { } public function...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Listeners/WriteScanLog.php
app/Listeners/WriteScanLog.php
<?php namespace App\Listeners; use App\Events\MediaScanCompleted; use App\Values\Scanning\ScanResult; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Support\Collection; use Illuminate\Support\Facades\File; readonly class WriteScanLog implements ShouldQueue { public function handle(MediaScanCompleted ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Listeners/DeletePodcastIfNoSubscribers.php
app/Listeners/DeletePodcastIfNoSubscribers.php
<?php namespace App\Listeners; use App\Events\UserUnsubscribedFromPodcast; use App\Services\PodcastService; use Illuminate\Contracts\Queue\ShouldQueue; readonly class DeletePodcastIfNoSubscribers implements ShouldQueue { public function __construct(private PodcastService $podcastService) { } public ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Listeners/PruneLibrary.php
app/Listeners/PruneLibrary.php
<?php namespace App\Listeners; use App\Services\LibraryManager; use Illuminate\Contracts\Queue\ShouldQueue; readonly class PruneLibrary implements ShouldQueue { public function __construct(private LibraryManager $libraryManager) { } public function handle(): void { $this->libraryManager-...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Listeners/DeleteNonExistingRecordsPostScan.php
app/Listeners/DeleteNonExistingRecordsPostScan.php
<?php namespace App\Listeners; use App\Events\MediaScanCompleted; use App\Models\Song; use App\Repositories\SongRepository; use App\Values\Scanning\ScanResult; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Database\Eloquent\Builder; readonly class DeleteNonExistingRecordsPostScan implements ShouldQueue ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Listeners/UnloveMultipleTracksOnLastfm.php
app/Listeners/UnloveMultipleTracksOnLastfm.php
<?php namespace App\Listeners; use App\Events\MultipleSongsUnliked; use App\Services\LastfmService; use Illuminate\Contracts\Queue\ShouldQueue; readonly class UnloveMultipleTracksOnLastfm implements ShouldQueue { public function __construct(private LastfmService $lastfm) { } public function handle(M...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Listeners/UpdateLastfmNowPlaying.php
app/Listeners/UpdateLastfmNowPlaying.php
<?php namespace App\Listeners; use App\Events\PlaybackStarted; use App\Services\LastfmService; use Illuminate\Contracts\Queue\ShouldQueue; readonly class UpdateLastfmNowPlaying implements ShouldQueue { public function __construct(private LastfmService $lastfm) { } public function handle(PlaybackStar...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Listeners/LoveTrackOnLastfm.php
app/Listeners/LoveTrackOnLastfm.php
<?php namespace App\Listeners; use App\Events\SongFavoriteToggled; use App\Services\LastfmService; use Illuminate\Contracts\Queue\ShouldQueue; readonly class LoveTrackOnLastfm implements ShouldQueue { public function __construct(private LastfmService $lastfm) { } public function handle(SongFavoriteT...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Listeners/LoveMultipleTracksOnLastfm.php
app/Listeners/LoveMultipleTracksOnLastfm.php
<?php namespace App\Listeners; use App\Events\MultipleSongsLiked; use App\Models\Song; use App\Services\LastfmService; use Illuminate\Contracts\Queue\ShouldQueue; readonly class LoveMultipleTracksOnLastfm implements ShouldQueue { public function __construct(private LastfmService $lastfm) { } public ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Observers/RadioStationObserver.php
app/Observers/RadioStationObserver.php
<?php namespace App\Observers; use App\Models\RadioStation; use Illuminate\Support\Facades\File; class RadioStationObserver { public function updating(RadioStation $radioStation): void { if (!$radioStation->isDirty('logo')) { return; } rescue_if( $radioStation...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Observers/GenreObserver.php
app/Observers/GenreObserver.php
<?php namespace App\Observers; use App\Helpers\Ulid; use App\Models\Genre; class GenreObserver { public function creating(Genre $genre): void { $genre->public_id ??= Ulid::generate(); } }
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Observers/PlaylistObserver.php
app/Observers/PlaylistObserver.php
<?php namespace App\Observers; use App\Models\Playlist; use Illuminate\Support\Facades\File; class PlaylistObserver { public function updating(Playlist $playlist): void { if (!$playlist->isDirty('cover')) { return; } $oldCover = $playlist->getRawOriginal('cover'); ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Observers/FolderObserver.php
app/Observers/FolderObserver.php
<?php namespace App\Observers; use App\Models\Folder; class FolderObserver { public function creating(Folder $folder): void { $folder->hash ??= simple_hash($folder->path); } }
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Observers/AlbumObserver.php
app/Observers/AlbumObserver.php
<?php namespace App\Observers; use App\Facades\Dispatcher; use App\Jobs\GenerateAlbumThumbnailJob; use App\Models\Album; use Illuminate\Support\Facades\File; class AlbumObserver { public function saved(Album $album): void { if ($album->cover && !File::exists(image_storage_path($album->thumbnail))) { ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Observers/PlaylistCollaborationTokenObserver.php
app/Observers/PlaylistCollaborationTokenObserver.php
<?php namespace App\Observers; use App\Helpers\Uuid; use App\Models\PlaylistCollaborationToken; class PlaylistCollaborationTokenObserver { public function creating(PlaylistCollaborationToken $token): void { $token->token ??= Uuid::generate(); } }
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Observers/ArtistObserver.php
app/Observers/ArtistObserver.php
<?php namespace App\Observers; use App\Models\Artist; use Illuminate\Support\Facades\File; class ArtistObserver { public function updating(Artist $artist): void { if (!$artist->isDirty('image')) { return; } $oldImage = $artist->getRawOriginal('image'); rescue_if(...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Observers/ThemeObserver.php
app/Observers/ThemeObserver.php
<?php namespace App\Observers; use App\Models\Theme; use Illuminate\Support\Facades\File; class ThemeObserver { public function deleted(Theme $theme): void { rescue_if( $theme->properties->bgImage, static function () use ($theme): void { File::delete([ ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Observers/UserObserver.php
app/Observers/UserObserver.php
<?php namespace App\Observers; use App\Helpers\Uuid; use App\Models\User; use Illuminate\Support\Facades\File; class UserObserver { public function creating(User $user): void { $user->public_id ??= Uuid::generate(); } public function updating(User $user): void { if (!$user->isDir...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Rules/MediaPath.php
app/Rules/MediaPath.php
<?php namespace App\Rules; use Closure; use Illuminate\Contracts\Validation\ValidationRule; use Illuminate\Support\Facades\File; class MediaPath implements ValidationRule { public function validate(string $attribute, mixed $value, Closure $fail): void { $passes = false; if (config('koel.stor...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Rules/ValidRadioStationUrl.php
app/Rules/ValidRadioStationUrl.php
<?php namespace App\Rules; use Closure; use Illuminate\Contracts\Validation\ValidationRule; use Illuminate\Support\Facades\Http; use Illuminate\Support\Str; use Illuminate\Translation\PotentiallyTranslatedString; class ValidRadioStationUrl implements ValidationRule { // Aid in testing by allowing the rule to be ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Rules/CustomizableUserPreference.php
app/Rules/CustomizableUserPreference.php
<?php namespace App\Rules; use App\Values\User\UserPreferences; use Closure; use Illuminate\Contracts\Validation\ValidationRule; class CustomizableUserPreference implements ValidationRule { public function validate(string $attribute, mixed $value, Closure $fail): void { if (!UserPreferences::customiz...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Rules/UserCanManageRole.php
app/Rules/UserCanManageRole.php
<?php namespace App\Rules; use App\Enums\Acl\Role; use App\Models\User; use Closure; use Illuminate\Contracts\Validation\ValidationRule; use Illuminate\Translation\PotentiallyTranslatedString; class UserCanManageRole implements ValidationRule { public function __construct(private readonly User $user) { }...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Rules/AllPlaylistsAreAccessibleBy.php
app/Rules/AllPlaylistsAreAccessibleBy.php
<?php namespace App\Rules; use App\Facades\License; use App\Models\User; use Closure; use Illuminate\Contracts\Validation\ValidationRule; use Illuminate\Support\Arr; final class AllPlaylistsAreAccessibleBy implements ValidationRule { public function __construct(private readonly User $user) { } publi...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Rules/AllPlayablesAreAccessibleBy.php
app/Rules/AllPlayablesAreAccessibleBy.php
<?php namespace App\Rules; use App\Models\User; use App\Repositories\SongRepository; use Closure; use Illuminate\Contracts\Validation\ValidationRule; use Illuminate\Support\Arr; class AllPlayablesAreAccessibleBy implements ValidationRule { public function __construct(private readonly User $user) { } ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Rules/ValidSmartPlaylistRulePayload.php
app/Rules/ValidSmartPlaylistRulePayload.php
<?php namespace App\Rules; use App\Values\SmartPlaylist\SmartPlaylistRuleGroupCollection; use Closure; use Illuminate\Contracts\Validation\ValidationRule; use Illuminate\Support\Arr; class ValidSmartPlaylistRulePayload implements ValidationRule { public function validate(string $attribute, mixed $value, Closure ...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Rules/ValidImageData.php
app/Rules/ValidImageData.php
<?php namespace App\Rules; use Closure; use Illuminate\Contracts\Validation\ValidationRule; use Intervention\Image\Decoders\Base64ImageDecoder; use Intervention\Image\Decoders\DataUriImageDecoder; use Intervention\Image\Laravel\Facades\Image; use Throwable; class ValidImageData implements ValidationRule { public...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Rules/SupportedAudioFile.php
app/Rules/SupportedAudioFile.php
<?php namespace App\Rules; use Closure; use Illuminate\Contracts\Validation\ValidationRule; use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\File; use Illuminate\Support\Str; class SupportedAudioFile implements ValidationRule { /** @param UploadedFile $value */ public function validate(string...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Rules/AvailableRole.php
app/Rules/AvailableRole.php
<?php namespace App\Rules; use App\Enums\Acl\Role; use App\Facades\License; use Closure; use Illuminate\Contracts\Validation\ValidationRule; use Illuminate\Translation\PotentiallyTranslatedString; class AvailableRole implements ValidationRule { /** * Run the validation rule. * * @param Closure(str...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Services/Util.php
app/Services/Util.php
<?php namespace App\Services; class Util { public function __construct() { defined('UTF8_BOM') || define('UTF8_BOM', chr(0xEF) . chr(0xBB) . chr(0xBF)); defined('UTF16_LITTLE_ENDIAN_BOM') || define('UTF16_LITTLE_ENDIAN_BOM', chr(0xFF) . chr(0xFE)); defined('UTF16_BIG_ENDIAN_BOM') || de...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false
koel/koel
https://github.com/koel/koel/blob/add9401a4b9a904bb1b9f679bc674ad1570ff20e/app/Services/NullEncyclopedia.php
app/Services/NullEncyclopedia.php
<?php namespace App\Services; use App\Models\Album; use App\Models\Artist; use App\Services\Contracts\Encyclopedia; use App\Values\Album\AlbumInformation; use App\Values\Artist\ArtistInformation; class NullEncyclopedia implements Encyclopedia { public function getArtistInformation(Artist $artist): ?ArtistInforma...
php
MIT
add9401a4b9a904bb1b9f679bc674ad1570ff20e
2026-01-04T15:02:34.446708Z
false