+ "{{ $recentEpisode->title }}" +
++ {{ $recentEpisode->podcast->name }} +
+ Episode {{ number_format($recentEpisode->episode_number + 0) }} +
{{ $recentEpisode->artwork->artist->name ?? 'Unknown' }} + +
diff --git a/.gitignore b/.gitignore index 6140d1a..9903df3 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ public_html/hot db/data/ db/dump/ static/dist/ +static/* storage/*.key diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e8f7f2e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM shinsenter/laravel:latest + +RUN apt update && apt install -y jpegoptim optipng pngquant gifsicle webp libavif-bin diff --git a/docker-compose.yml b/docker-compose.yml index 3b41bc7..dbd201a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,10 @@ version: '3' services: laravel-app: env_file: .env - image: shinsenter/laravel:latest + build: + context: . + dockerfile: Dockerfile + container_name: ${CONTAINER_NAME:-pcag-laravel} volumes: - ./site:/var/www/html - ./static:/static @@ -16,9 +19,9 @@ services: DB_DATABASE: ${DB_DATABASE} DB_USERNAME: ${DB_USERNAME} DB_PASSWORD: ${DB_PASSWORD} - # LARAVEL_QUEUE_ENABLED: true - # LARAVEL_QUEUE_OPTIONS: --timeout=60 --tries=3 redis - # LARAVEL_SCHEDULE_ENABLED: true + LARAVEL_QUEUE_ENABLED: true + LARAVEL_QUEUE_OPTIONS: --timeout=60 --tries=3 redis + LARAVEL_SCHEDULE_ENABLED: true ports: - "80:80" links: @@ -28,7 +31,7 @@ services: static: image: nginx:alpine volumes: - - ./static:/usr/share/nginx/html:ro + - ./static:/usr/share/nginx/html environment: TZ: UTC PUID: ${UID:-1000} diff --git a/site/app/Console/Commands/MapLegacyArtworkToLegacyEpisodeCommand.php b/site/app/Console/Commands/MapLegacyArtworkToLegacyEpisodeCommand.php new file mode 100644 index 0000000..43bd032 --- /dev/null +++ b/site/app/Console/Commands/MapLegacyArtworkToLegacyEpisodeCommand.php @@ -0,0 +1,60 @@ +get(); + foreach ($artworks as $artwork) { + if ($artwork->id > 76200) { + $legacyDetailResponse = $this->getArtworkInfoFromApi($artwork->legacy_id); + $response = $legacyDetailResponse->object(); + if ($response->artwork->episode_id) { + $episode = Episode::where('legacy_id', $response->artwork->episode_id)->first(); + if ($episode) { + $artwork->episode_id = $episode->id; + $this->line('Artwork ID ' . $artwork->id . ' is mapped to Episode ID ' . $episode->id); + if ($artwork->isDirty()) { + $this->line('This is a new mapping.'); + $artwork->save(); + } + } + } + } + } + } + + private function getArtworkInfoFromApi($artwork_legacy_id) { + $response = Http::timeout(180) + ->get('https://noagendaartgenerator.com/artworkapi/' . $artwork_legacy_id, + [ + 'p' => '7476', + ] + ); + return $response; + } +} diff --git a/site/app/Console/Commands/MapSelectedLegacyArtworkToEpisode.php b/site/app/Console/Commands/MapSelectedLegacyArtworkToEpisode.php new file mode 100644 index 0000000..b8635d4 --- /dev/null +++ b/site/app/Console/Commands/MapSelectedLegacyArtworkToEpisode.php @@ -0,0 +1,59 @@ +line('Checking episode ' . $episode->episode_number); + $legacyEpisodeResponse = $this->getEpisodeFromApi($episode->episode_number); + $response = $legacyEpisodeResponse->object(); + if ($response->episode->artwork_id && $response->episode->artwork_id + 0 > 0) { + $selectedArtwork = Artwork::where('legacy_id', $response->episode->artwork_id)->first(); + if ($selectedArtwork) { + $episode->artwork_id = $selectedArtwork->id; + $this->line('Artwork ID ' . $selectedArtwork->id . ' marked as episode artwork for episode ' . $episode->episode_number); + if ($episode->isDirty()) { + $this->line('This is a new mapping.'); + $episode->save(); + } + } + } + } + } + + private function getEpisodeFromApi($episode_legacy_id) { + $response = Http::timeout(180) + ->get('https://noagendaartgenerator.com/episodeapi/' . $episode_legacy_id, + [ + 'p' => '7476', + ] + ); + return $response; + } +} diff --git a/site/app/Http/Controllers/PageController.php b/site/app/Http/Controllers/PageController.php index 7d5ae4f..8b6855a 100644 --- a/site/app/Http/Controllers/PageController.php +++ b/site/app/Http/Controllers/PageController.php @@ -3,13 +3,77 @@ namespace App\Http\Controllers; use Illuminate\Http\Request; +use Illuminate\Support\Facades\Cache; use App\Models\Artwork; +use App\Models\Artist; +use App\Models\Episode; class PageController extends Controller { public function landing() { $user = auth()->user(); - return view('home.page'); + $headerCounters = $this->getHeaderCounters(); + $recentEpisodes = $this->mostRecentEpisodes(); + return view('home.page', [ + 'user' => $user, + 'headerCounters' => $headerCounters, + 'recentEpisodes' => $recentEpisodes, + ]); } + + private function mostRecentEpisodes() + { + $episodes = Cache::remember('latestEpisodes', 30, function() { + return Episode::where('published', true) + ->with('podcast') + ->with('artwork') + ->with('artwork.artist') + ->orderBy('episode_date', 'desc') + ->limit(10) + ->get(); + }); + return $episodes; + } + + private function getHeaderCounters() + { + $headerCounters = []; + $artworkCountNumber = Cache::remember('artworkCountNumber', 10, function() { + return Artwork::all()->count(); + }); + $artistCountNumber = Cache::remember('artistCountNumber', 10, function() { + return Artist::all()->count(); + }); + $episodeCountNumber = Cache::remember('episodeCountNumber', 10, function() { + return Episode::all()->count(); + }); + $headerCounters['Artworks'] = $this->shortNumberCount($artworkCountNumber); + $headerCounters['Artists'] = $this->shortNumberCount($artistCountNumber); + $headerCounters['Episodes'] = $this->shortNumberCount($episodeCountNumber); + return $headerCounters; + } + private function shortNumberCount($number) + { + $units = ['', 'K', 'M', 'B', 'T']; + for ($i = 0; $number >= 1000; $i++) { + $number /= 1000; + } + return [ + 'number' => $this->numberFormatPrecision($number, 1), //number_format(floatval($number), 1), + 'unit' => $units[$i], + ]; + } + + private function numberFormatPrecision($number, $precision = 2, $separator = '.') + { + $numberParts = explode($separator, $number); + $response = $numberParts[0]; + if (count($numberParts)>1 && $precision > 0) { + $response .= $separator; + $response .= substr($numberParts[1], 0, $precision); + } + return $response; + } + } diff --git a/site/app/Jobs/ImportLegacyUserJob.php b/site/app/Jobs/ImportLegacyUserJob.php new file mode 100644 index 0000000..951daf5 --- /dev/null +++ b/site/app/Jobs/ImportLegacyUserJob.php @@ -0,0 +1,68 @@ +user = $user; + } + + /** + * Execute the job. + */ + public function handle(): void + { + $name = str_replace(' ', '', $this->user->username); + $email = strtolower(trim($this->user->email)); + $email_verified_at = Carbon::parse($this->user->created_at); + $this->createUser($name, $email, $email_verified_at); + } + + private function createUser($name, $email, $email_verified_at) + { + $user = User::where('name', $name)->first(); + if (!$user) { + $user = User::factory()->state([ + 'name' => $name, + 'email' => $email, + 'email_verified_at' => $email_verified_at, + 'remember_token' => null, + ])->create(); + } + $artist = Artist::where('user_id', $user->id)->first(); + if (!$artist) { + $artist = Artist::factory()->state([ + 'user_id' => $user->id, + 'name' => $this->user->profile->name, + 'avatar' => null, + 'header' => null, + 'location' => $this->user->profile->location ?? 'No Agenda Art Generator', + 'website' => $this->user->profile->website ?? null, + 'bio' => null, + ])->create(); + } + foreach ($this->user->artworks as $artwork) { + StashAndOptimizeLegacyArtworkJob::dispatch($artist, $artwork); + } + } +} diff --git a/site/app/Jobs/StashAndOptimizeLegacyArtworkJob.php b/site/app/Jobs/StashAndOptimizeLegacyArtworkJob.php new file mode 100644 index 0000000..3d73cba --- /dev/null +++ b/site/app/Jobs/StashAndOptimizeLegacyArtworkJob.php @@ -0,0 +1,125 @@ +artist = $artist; + $this->artwork = $artwork; + } + + /** + * Execute the job. + */ + public function handle(): void + { + $date = Carbon::parse($this->artwork->created_at); + $basename = $date->format('Y') + . '/' . $date->format('m') + . '/' . Str::slug($this->artist->name) + . '-' . Str::slug($this->artwork->title) + . '_' . $this->artwork->id . '.jpg'; + $filename = 'artworks/' . $basename; + $thumbnailName = 'thumbnails/' . $basename; + if (Storage::disk('static')->exists($filename)) { + Log::channel('artwork_import')->error($filename . ' already exists. Filesize: ' . Storage::disk('static')->size($filename)); + $this->createArtwork($basename); + return; + } + $img = Image::make('https://noagendaartgenerator.com' . $this->artwork->path . '/' . $this->artwork->filename) + ->resize(3000, null, function ($constraint) { + $constraint->aspectRatio(); + }) + ->encode('jpg', 100); + $thumbImg = Image::make('https://noagendaartgenerator.com' . $this->artwork->path . '/' . $this->artwork->filename) + ->resize(512, null, function ($constraint) { + $constraint->aspectRatio(); + }) + ->encode('jpg', 100); + $imgLocation = Storage::disk('static')->put($filename, $img); + $thumbLocation = Storage::disk('static')->put($thumbnailName, $thumbImg); + $size_before = Storage::disk('static')->size($filename); + $thumb_size_before = Storage::disk('static')->size($thumbnailName); + ImageOptimizer::optimize(Storage::disk('static')->path($filename)); + ImageOptimizer::optimize(Storage::disk('static')->path($thumbnailName)); + $size_after = Storage::disk('static')->size($filename); + $thumb_size_after = Storage::disk('static')->size($thumbnailName); + $diff = $size_before - $size_after; + $thumbDiff = $thumb_size_before - $thumb_size_after; + Log::channel('artwork_import')->info('Filesize Before: ' . $size_before); + Log::channel('artwork_import')->info('Filesize After: ' . $size_after); + $perc_smaller = ($diff / $size_before) * 100; + $thumb_perc_smaller = ($thumbDiff / $thumb_size_before) * 100; + Log::channel('artwork_import')->info(number_format($perc_smaller, 2) . '% smaller.'); + Log::channel('artwork_import')->info(number_format($thumb_perc_smaller, 2) . '% smaller thumbnail - ' . $thumb_size_after); + Log::channel('artwork_import')->info('Saved and resized ' . $filename); + $this->createArtwork($basename); + } + + private function createArtwork($basename) { + $artwork = Artwork::where('legacy_id', $this->artwork->id)->first(); + if (!$this->artwork->episode_id) { + $episode = Episode::where('episode_date', '>=', Carbon::parse($this->artwork->created_at)->startOfDay()) + ->orderBy('episode_date', 'asc') + ->first(); + } else { + $episode = Episode::where('legacy_id', $this->artwork->episode_id)->first(); + } + if (!$artwork) { + $artwork = Artwork::where('filename', $basename)->first(); + if ($artwork) { + $artwork->legacy_id = $this->artwork->id; + $artwork->episode_id = $episode->id ?? null; + $artwork->save(); + return; + } + } + if (!$artwork) { + Log::channel('artwork_import')->info('making new artwork model for ' . $basename); + Artwork::factory()->state([ + 'title' => $this->artwork->title, + 'artist_id' => $this->artist->id, + 'description' => '', + 'podcast_id' => 1, + 'overlay_id' => $this->artwork->overlay_id, + 'episode_id' => $episode->id ?? null, + 'filename' => $basename ?? null, + 'created_at' => Carbon::parse($this->artwork->created_at), + 'updated_at' => Carbon::parse($this->artwork->updated_at), + 'legacy_id' => $this->artwork->id, + ])->create(); + } else { + Log::channel('artwork_import')->info($artwork->id . ' has a model it exists with ' . $artwork->filename); + } + } +} diff --git a/site/app/Models/Episode.php b/site/app/Models/Episode.php index c1ba49f..e8861cc 100644 --- a/site/app/Models/Episode.php +++ b/site/app/Models/Episode.php @@ -21,7 +21,7 @@ public function podcast() public function artwork() { - return $this->hasOne(Artwork::class); + return $this->hasOne(Artwork::class, 'id', 'artwork_id'); } public function artist() diff --git a/site/composer.json b/site/composer.json index c9fd2ab..9876f6a 100644 --- a/site/composer.json +++ b/site/composer.json @@ -11,7 +11,8 @@ "laravel/framework": "^10.10", "laravel/sanctum": "^3.2", "laravel/tinker": "^2.8", - "livewire/livewire": "^2.12" + "livewire/livewire": "^2.12", + "spatie/laravel-image-optimizer": "^1.7" }, "require-dev": { "fakerphp/faker": "^1.9.1", diff --git a/site/composer.lock b/site/composer.lock index 48c6f8f..9f02ea0 100644 --- a/site/composer.lock +++ b/site/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8cbbbcad8f0d5fb80b1702a457d88e98", + "content-hash": "bdc4955e359d85d20504db39e7b1f694", "packages": [ { "name": "brick/math", @@ -1060,16 +1060,16 @@ }, { "name": "laravel/framework", - "version": "v10.13.5", + "version": "v10.16.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "03106ae9ba2ec4b36dc973b7bdca6fad81e032b4" + "reference": "5c93d2795c393b462481179ce42dedfb30cc19b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/03106ae9ba2ec4b36dc973b7bdca6fad81e032b4", - "reference": "03106ae9ba2ec4b36dc973b7bdca6fad81e032b4", + "url": "https://api.github.com/repos/laravel/framework/zipball/5c93d2795c393b462481179ce42dedfb30cc19b5", + "reference": "5c93d2795c393b462481179ce42dedfb30cc19b5", "shasum": "" }, "require": { @@ -1256,7 +1256,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-06-08T20:25:36+00:00" + "time": "2023-07-26T03:30:46+00:00" }, { "name": "laravel/sanctum", @@ -1326,16 +1326,16 @@ }, { "name": "laravel/serializable-closure", - "version": "v1.3.0", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "f23fe9d4e95255dacee1bf3525e0810d1a1b0f37" + "reference": "e5a3057a5591e1cfe8183034b0203921abe2c902" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/f23fe9d4e95255dacee1bf3525e0810d1a1b0f37", - "reference": "f23fe9d4e95255dacee1bf3525e0810d1a1b0f37", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/e5a3057a5591e1cfe8183034b0203921abe2c902", + "reference": "e5a3057a5591e1cfe8183034b0203921abe2c902", "shasum": "" }, "require": { @@ -1382,7 +1382,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2023-01-30T18:31:20+00:00" + "time": "2023-07-14T13:56:28+00:00" }, { "name": "laravel/tinker", @@ -1846,16 +1846,16 @@ }, { "name": "livewire/livewire", - "version": "v2.12.3", + "version": "v2.12.4", "source": { "type": "git", "url": "https://github.com/livewire/livewire.git", - "reference": "019b1e69d8cd8c7e749eba7a38e4fa69ecbc8f74" + "reference": "cca62ce8f751279c36404886b74a02e6dd0110f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/livewire/livewire/zipball/019b1e69d8cd8c7e749eba7a38e4fa69ecbc8f74", - "reference": "019b1e69d8cd8c7e749eba7a38e4fa69ecbc8f74", + "url": "https://api.github.com/repos/livewire/livewire/zipball/cca62ce8f751279c36404886b74a02e6dd0110f2", + "reference": "cca62ce8f751279c36404886b74a02e6dd0110f2", "shasum": "" }, "require": { @@ -1907,7 +1907,7 @@ "description": "A front-end framework for Laravel.", "support": { "issues": "https://github.com/livewire/livewire/issues", - "source": "https://github.com/livewire/livewire/tree/v2.12.3" + "source": "https://github.com/livewire/livewire/tree/v2.12.4" }, "funding": [ { @@ -1915,20 +1915,20 @@ "type": "github" } ], - "time": "2023-03-03T20:12:38+00:00" + "time": "2023-07-28T20:46:24+00:00" }, { "name": "monolog/monolog", - "version": "3.3.1", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "9b5daeaffce5b926cac47923798bba91059e60e2" + "reference": "e2392369686d420ca32df3803de28b5d6f76867d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/9b5daeaffce5b926cac47923798bba91059e60e2", - "reference": "9b5daeaffce5b926cac47923798bba91059e60e2", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/e2392369686d420ca32df3803de28b5d6f76867d", + "reference": "e2392369686d420ca32df3803de28b5d6f76867d", "shasum": "" }, "require": { @@ -1943,7 +1943,7 @@ "doctrine/couchdb": "~1.0@dev", "elasticsearch/elasticsearch": "^7 || ^8", "ext-json": "*", - "graylog2/gelf-php": "^1.4.2 || ^2@dev", + "graylog2/gelf-php": "^1.4.2 || ^2.0", "guzzlehttp/guzzle": "^7.4.5", "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", @@ -1951,7 +1951,7 @@ "phpstan/phpstan": "^1.9", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^9.5.26", + "phpunit/phpunit": "^10.1", "predis/predis": "^1.1 || ^2", "ruflin/elastica": "^7", "symfony/mailer": "^5.4 || ^6", @@ -2004,7 +2004,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.3.1" + "source": "https://github.com/Seldaek/monolog/tree/3.4.0" }, "funding": [ { @@ -2016,20 +2016,20 @@ "type": "tidelift" } ], - "time": "2023-02-06T13:46:10+00:00" + "time": "2023-06-21T08:46:11+00:00" }, { "name": "nesbot/carbon", - "version": "2.67.0", + "version": "2.68.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "c1001b3bc75039b07f38a79db5237c4c529e04c8" + "reference": "4f991ed2a403c85efbc4f23eb4030063fdbe01da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/c1001b3bc75039b07f38a79db5237c4c529e04c8", - "reference": "c1001b3bc75039b07f38a79db5237c4c529e04c8", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4f991ed2a403c85efbc4f23eb4030063fdbe01da", + "reference": "4f991ed2a403c85efbc4f23eb4030063fdbe01da", "shasum": "" }, "require": { @@ -2118,7 +2118,7 @@ "type": "tidelift" } ], - "time": "2023-05-25T22:09:47+00:00" + "time": "2023-06-20T18:29:04+00:00" }, { "name": "nette/schema", @@ -2184,20 +2184,20 @@ }, { "name": "nette/utils", - "version": "v4.0.0", + "version": "v4.0.1", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "cacdbf5a91a657ede665c541eda28941d4b09c1e" + "reference": "9ae1572d0224eea15eb43aaeb902888b3b967196" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/cacdbf5a91a657ede665c541eda28941d4b09c1e", - "reference": "cacdbf5a91a657ede665c541eda28941d4b09c1e", + "url": "https://api.github.com/repos/nette/utils/zipball/9ae1572d0224eea15eb43aaeb902888b3b967196", + "reference": "9ae1572d0224eea15eb43aaeb902888b3b967196", "shasum": "" }, "require": { - "php": ">=8.0 <8.3" + "php": ">=8.0 <8.4" }, "conflict": { "nette/finder": "<3", @@ -2205,7 +2205,7 @@ }, "require-dev": { "jetbrains/phpstorm-attributes": "dev-master", - "nette/tester": "^2.4", + "nette/tester": "^2.5", "phpstan/phpstan": "^1.0", "tracy/tracy": "^2.9" }, @@ -2265,22 +2265,22 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.0.0" + "source": "https://github.com/nette/utils/tree/v4.0.1" }, - "time": "2023-02-02T10:41:53+00:00" + "time": "2023-07-30T13:02:42+00:00" }, { "name": "nikic/php-parser", - "version": "v4.15.5", + "version": "v4.16.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e" + "reference": "19526a33fb561ef417e822e85f08a00db4059c17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", + "reference": "19526a33fb561ef417e822e85f08a00db4059c17", "shasum": "" }, "require": { @@ -2321,9 +2321,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" }, - "time": "2023-05-19T20:20:00+00:00" + "time": "2023-06-25T14:52:30+00:00" }, { "name": "nunomaduro/termwind", @@ -2852,16 +2852,16 @@ }, { "name": "psy/psysh", - "version": "v0.11.18", + "version": "v0.11.19", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "4f00ee9e236fa6a48f4560d1300b9c961a70a7ec" + "reference": "1724ceff278daeeac5a006744633bacbb2dc4706" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/4f00ee9e236fa6a48f4560d1300b9c961a70a7ec", - "reference": "4f00ee9e236fa6a48f4560d1300b9c961a70a7ec", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/1724ceff278daeeac5a006744633bacbb2dc4706", + "reference": "1724ceff278daeeac5a006744633bacbb2dc4706", "shasum": "" }, "require": { @@ -2922,9 +2922,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.18" + "source": "https://github.com/bobthecow/psysh/tree/v0.11.19" }, - "time": "2023-05-23T02:31:11+00:00" + "time": "2023-07-15T19:42:19+00:00" }, { "name": "ralouphie/getallheaders", @@ -3152,17 +3152,140 @@ "time": "2023-04-15T23:01:58+00:00" }, { - "name": "symfony/console", - "version": "v6.3.0", + "name": "spatie/image-optimizer", + "version": "1.7.1", "source": { "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7" + "url": "https://github.com/spatie/image-optimizer.git", + "reference": "af179994e2d2413e4b3ba2d348d06b4eaddbeb30" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", - "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", + "url": "https://api.github.com/repos/spatie/image-optimizer/zipball/af179994e2d2413e4b3ba2d348d06b4eaddbeb30", + "reference": "af179994e2d2413e4b3ba2d348d06b4eaddbeb30", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.3|^8.0", + "psr/log": "^1.0 | ^2.0 | ^3.0", + "symfony/process": "^4.2|^5.0|^6.0" + }, + "require-dev": { + "pestphp/pest": "^1.21", + "phpunit/phpunit": "^8.5.21|^9.4.4", + "symfony/var-dumper": "^4.2|^5.0|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\ImageOptimizer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Easily optimize images using PHP", + "homepage": "https://github.com/spatie/image-optimizer", + "keywords": [ + "image-optimizer", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/image-optimizer/issues", + "source": "https://github.com/spatie/image-optimizer/tree/1.7.1" + }, + "time": "2023-07-27T07:57:32+00:00" + }, + { + "name": "spatie/laravel-image-optimizer", + "version": "1.7.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-image-optimizer.git", + "reference": "cd8945e47b9fd01bc7b770eecd57c56f46c47422" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-image-optimizer/zipball/cd8945e47b9fd01bc7b770eecd57c56f46c47422", + "reference": "cd8945e47b9fd01bc7b770eecd57c56f46c47422", + "shasum": "" + }, + "require": { + "laravel/framework": "^8.0|^9.0|^10.0", + "php": "^8.0", + "spatie/image-optimizer": "^1.2.0" + }, + "require-dev": { + "orchestra/testbench": "^6.23|^7.0|^8.0", + "phpunit/phpunit": "^9.4" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\LaravelImageOptimizer\\ImageOptimizerServiceProvider" + ], + "aliases": { + "ImageOptimizer": "Spatie\\LaravelImageOptimizer\\Facades\\ImageOptimizer" + } + } + }, + "autoload": { + "psr-4": { + "Spatie\\LaravelImageOptimizer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Optimize images in your Laravel app", + "homepage": "https://github.com/spatie/laravel-image-optimizer", + "keywords": [ + "laravel-image-optimizer", + "spatie" + ], + "support": { + "source": "https://github.com/spatie/laravel-image-optimizer/tree/1.7.1" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + } + ], + "time": "2023-01-24T23:44:33+00:00" + }, + { + "name": "symfony/console", + "version": "v6.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "aa5d64ad3f63f2e48964fc81ee45cb318a723898" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/aa5d64ad3f63f2e48964fc81ee45cb318a723898", + "reference": "aa5d64ad3f63f2e48964fc81ee45cb318a723898", "shasum": "" }, "require": { @@ -3223,7 +3346,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.3.0" + "source": "https://github.com/symfony/console/tree/v6.3.2" }, "funding": [ { @@ -3239,20 +3362,20 @@ "type": "tidelift" } ], - "time": "2023-05-29T12:49:39+00:00" + "time": "2023-07-19T20:17:28+00:00" }, { "name": "symfony/css-selector", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "88453e64cd86c5b60e8d2fb2c6f953bbc353ffbf" + "reference": "883d961421ab1709877c10ac99451632a3d6fa57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/88453e64cd86c5b60e8d2fb2c6f953bbc353ffbf", - "reference": "88453e64cd86c5b60e8d2fb2c6f953bbc353ffbf", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/883d961421ab1709877c10ac99451632a3d6fa57", + "reference": "883d961421ab1709877c10ac99451632a3d6fa57", "shasum": "" }, "require": { @@ -3288,7 +3411,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v6.3.0" + "source": "https://github.com/symfony/css-selector/tree/v6.3.2" }, "funding": [ { @@ -3304,7 +3427,7 @@ "type": "tidelift" } ], - "time": "2023-03-20T16:43:42+00:00" + "time": "2023-07-12T16:00:22+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3375,16 +3498,16 @@ }, { "name": "symfony/error-handler", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "99d2d814a6351461af350ead4d963bd67451236f" + "reference": "85fd65ed295c4078367c784e8a5a6cee30348b7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/99d2d814a6351461af350ead4d963bd67451236f", - "reference": "99d2d814a6351461af350ead4d963bd67451236f", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/85fd65ed295c4078367c784e8a5a6cee30348b7a", + "reference": "85fd65ed295c4078367c784e8a5a6cee30348b7a", "shasum": "" }, "require": { @@ -3429,7 +3552,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.3.0" + "source": "https://github.com/symfony/error-handler/tree/v6.3.2" }, "funding": [ { @@ -3445,20 +3568,20 @@ "type": "tidelift" } ], - "time": "2023-05-10T12:03:13+00:00" + "time": "2023-07-16T17:05:46+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa" + "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa", - "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/adb01fe097a4ee930db9258a3cc906b5beb5cf2e", + "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e", "shasum": "" }, "require": { @@ -3509,7 +3632,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.2" }, "funding": [ { @@ -3525,7 +3648,7 @@ "type": "tidelift" } ], - "time": "2023-04-21T14:41:17+00:00" + "time": "2023-07-06T06:56:43+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -3605,16 +3728,16 @@ }, { "name": "symfony/finder", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2" + "reference": "78ce4c29757d657d2b41a91c328923b9a0d6b43d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/d9b01ba073c44cef617c7907ce2419f8d00d75e2", - "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2", + "url": "https://api.github.com/repos/symfony/finder/zipball/78ce4c29757d657d2b41a91c328923b9a0d6b43d", + "reference": "78ce4c29757d657d2b41a91c328923b9a0d6b43d", "shasum": "" }, "require": { @@ -3649,7 +3772,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.3.0" + "source": "https://github.com/symfony/finder/tree/v6.3.2" }, "funding": [ { @@ -3665,20 +3788,20 @@ "type": "tidelift" } ], - "time": "2023-04-02T01:25:41+00:00" + "time": "2023-07-13T14:29:38+00:00" }, { "name": "symfony/http-foundation", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "718a97ed430d34e5c568ea2c44eab708c6efbefb" + "reference": "43ed99d30f5f466ffa00bdac3f5f7aa9cd7617c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/718a97ed430d34e5c568ea2c44eab708c6efbefb", - "reference": "718a97ed430d34e5c568ea2c44eab708c6efbefb", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/43ed99d30f5f466ffa00bdac3f5f7aa9cd7617c3", + "reference": "43ed99d30f5f466ffa00bdac3f5f7aa9cd7617c3", "shasum": "" }, "require": { @@ -3726,7 +3849,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.3.0" + "source": "https://github.com/symfony/http-foundation/tree/v6.3.2" }, "funding": [ { @@ -3742,20 +3865,20 @@ "type": "tidelift" } ], - "time": "2023-05-19T12:46:45+00:00" + "time": "2023-07-23T21:58:39+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "241973f3dd900620b1ca052fe409144f11aea748" + "reference": "51daa1e14a4b5cc7260c47d5a10a11ab32c88b63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/241973f3dd900620b1ca052fe409144f11aea748", - "reference": "241973f3dd900620b1ca052fe409144f11aea748", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/51daa1e14a4b5cc7260c47d5a10a11ab32c88b63", + "reference": "51daa1e14a4b5cc7260c47d5a10a11ab32c88b63", "shasum": "" }, "require": { @@ -3839,7 +3962,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.3.0" + "source": "https://github.com/symfony/http-kernel/tree/v6.3.2" }, "funding": [ { @@ -3855,7 +3978,7 @@ "type": "tidelift" } ], - "time": "2023-05-30T19:03:32+00:00" + "time": "2023-07-30T09:04:05+00:00" }, { "name": "symfony/mailer", @@ -3939,16 +4062,16 @@ }, { "name": "symfony/mime", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "7b5d2121858cd6efbed778abce9cfdd7ab1f62ad" + "reference": "fa1b1c1bbd5dcc0b1a8c88f45bb757f5e11ffa52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/7b5d2121858cd6efbed778abce9cfdd7ab1f62ad", - "reference": "7b5d2121858cd6efbed778abce9cfdd7ab1f62ad", + "url": "https://api.github.com/repos/symfony/mime/zipball/fa1b1c1bbd5dcc0b1a8c88f45bb757f5e11ffa52", + "reference": "fa1b1c1bbd5dcc0b1a8c88f45bb757f5e11ffa52", "shasum": "" }, "require": { @@ -3961,7 +4084,7 @@ "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", "symfony/mailer": "<5.4", - "symfony/serializer": "<6.2" + "symfony/serializer": "<6.2.13|>=6.3,<6.3.2" }, "require-dev": { "egulias/email-validator": "^2.1.10|^3.1|^4", @@ -3970,7 +4093,7 @@ "symfony/dependency-injection": "^5.4|^6.0", "symfony/property-access": "^5.4|^6.0", "symfony/property-info": "^5.4|^6.0", - "symfony/serializer": "^6.2" + "symfony/serializer": "~6.2.13|^6.3.2" }, "type": "library", "autoload": { @@ -4002,7 +4125,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.3.0" + "source": "https://github.com/symfony/mime/tree/v6.3.2" }, "funding": [ { @@ -4018,7 +4141,7 @@ "type": "tidelift" } ], - "time": "2023-04-28T15:57:00+00:00" + "time": "2023-07-27T06:30:42+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4757,16 +4880,16 @@ }, { "name": "symfony/process", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628" + "reference": "c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/8741e3ed7fe2e91ec099e02446fb86667a0f1628", - "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628", + "url": "https://api.github.com/repos/symfony/process/zipball/c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d", + "reference": "c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d", "shasum": "" }, "require": { @@ -4798,7 +4921,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.3.0" + "source": "https://github.com/symfony/process/tree/v6.3.2" }, "funding": [ { @@ -4814,20 +4937,20 @@ "type": "tidelift" } ], - "time": "2023-05-19T08:06:44+00:00" + "time": "2023-07-12T16:00:22+00:00" }, { "name": "symfony/routing", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "827f59fdc67eecfc4dfff81f9c93bf4d98f0c89b" + "reference": "9874c77e1746c7be68ae67e79433cbb202648a8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/827f59fdc67eecfc4dfff81f9c93bf4d98f0c89b", - "reference": "827f59fdc67eecfc4dfff81f9c93bf4d98f0c89b", + "url": "https://api.github.com/repos/symfony/routing/zipball/9874c77e1746c7be68ae67e79433cbb202648a8d", + "reference": "9874c77e1746c7be68ae67e79433cbb202648a8d", "shasum": "" }, "require": { @@ -4880,7 +5003,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.3.0" + "source": "https://github.com/symfony/routing/tree/v6.3.2" }, "funding": [ { @@ -4896,7 +5019,7 @@ "type": "tidelift" } ], - "time": "2023-04-28T15:57:00+00:00" + "time": "2023-07-24T13:52:02+00:00" }, { "name": "symfony/service-contracts", @@ -4982,16 +5105,16 @@ }, { "name": "symfony/string", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f" + "reference": "53d1a83225002635bca3482fcbf963001313fb68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f2e190ee75ff0f5eced645ec0be5c66fac81f51f", - "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f", + "url": "https://api.github.com/repos/symfony/string/zipball/53d1a83225002635bca3482fcbf963001313fb68", + "reference": "53d1a83225002635bca3482fcbf963001313fb68", "shasum": "" }, "require": { @@ -5048,7 +5171,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.0" + "source": "https://github.com/symfony/string/tree/v6.3.2" }, "funding": [ { @@ -5064,7 +5187,7 @@ "type": "tidelift" } ], - "time": "2023-03-21T21:06:29+00:00" + "time": "2023-07-05T08:41:27+00:00" }, { "name": "symfony/translation", @@ -5314,16 +5437,16 @@ }, { "name": "symfony/var-dumper", - "version": "v6.3.0", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "6acdcd5c122074ee9f7b051e4fb177025c277a0e" + "reference": "34e5ca671222670ae00749d1f554713021f8ef63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/6acdcd5c122074ee9f7b051e4fb177025c277a0e", - "reference": "6acdcd5c122074ee9f7b051e4fb177025c277a0e", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/34e5ca671222670ae00749d1f554713021f8ef63", + "reference": "34e5ca671222670ae00749d1f554713021f8ef63", "shasum": "" }, "require": { @@ -5336,6 +5459,7 @@ "require-dev": { "ext-iconv": "*", "symfony/console": "^5.4|^6.0", + "symfony/http-kernel": "^5.4|^6.0", "symfony/process": "^5.4|^6.0", "symfony/uid": "^5.4|^6.0", "twig/twig": "^2.13|^3.0.4" @@ -5376,7 +5500,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.3.0" + "source": "https://github.com/symfony/var-dumper/tree/v6.3.2" }, "funding": [ { @@ -5392,7 +5516,7 @@ "type": "tidelift" } ], - "time": "2023-05-25T13:09:35+00:00" + "time": "2023-07-21T07:05:52+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -5735,16 +5859,16 @@ }, { "name": "filp/whoops", - "version": "2.15.2", + "version": "2.15.3", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73" + "reference": "c83e88a30524f9360b11f585f71e6b17313b7187" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/aac9304c5ed61bf7b1b7a6064bf9806ab842ce73", - "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73", + "url": "https://api.github.com/repos/filp/whoops/zipball/c83e88a30524f9360b11f585f71e6b17313b7187", + "reference": "c83e88a30524f9360b11f585f71e6b17313b7187", "shasum": "" }, "require": { @@ -5794,7 +5918,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.15.2" + "source": "https://github.com/filp/whoops/tree/2.15.3" }, "funding": [ { @@ -5802,7 +5926,7 @@ "type": "github" } ], - "time": "2023-04-12T12:00:00+00:00" + "time": "2023-07-13T12:00:00+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -5857,16 +5981,16 @@ }, { "name": "laravel/breeze", - "version": "v1.21.1", + "version": "v1.21.2", "source": { "type": "git", "url": "https://github.com/laravel/breeze.git", - "reference": "1cb124f74debc1d5914a7bf2856b793c44ba396d" + "reference": "08f4c2e3567ded8a2f8ad80ddb8f016fce57d6ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/breeze/zipball/1cb124f74debc1d5914a7bf2856b793c44ba396d", - "reference": "1cb124f74debc1d5914a7bf2856b793c44ba396d", + "url": "https://api.github.com/repos/laravel/breeze/zipball/08f4c2e3567ded8a2f8ad80ddb8f016fce57d6ee", + "reference": "08f4c2e3567ded8a2f8ad80ddb8f016fce57d6ee", "shasum": "" }, "require": { @@ -5915,20 +6039,20 @@ "issues": "https://github.com/laravel/breeze/issues", "source": "https://github.com/laravel/breeze" }, - "time": "2023-06-16T21:23:43+00:00" + "time": "2023-06-21T23:07:25+00:00" }, { "name": "laravel/pint", - "version": "v1.10.3", + "version": "v1.10.5", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "c472786bca01e4812a9bb7933b23edfc5b6877b7" + "reference": "a458fb057bfa2f5a09888a8aa349610be807b0c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/c472786bca01e4812a9bb7933b23edfc5b6877b7", - "reference": "c472786bca01e4812a9bb7933b23edfc5b6877b7", + "url": "https://api.github.com/repos/laravel/pint/zipball/a458fb057bfa2f5a09888a8aa349610be807b0c3", + "reference": "a458fb057bfa2f5a09888a8aa349610be807b0c3", "shasum": "" }, "require": { @@ -5939,9 +6063,9 @@ "php": "^8.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.18.0", + "friendsofphp/php-cs-fixer": "^3.21.1", "illuminate/view": "^10.5.1", - "laravel-zero/framework": "^10.0.2", + "laravel-zero/framework": "^10.1.1", "mockery/mockery": "^1.5.1", "nunomaduro/larastan": "^2.5.1", "nunomaduro/termwind": "^1.15.1", @@ -5981,20 +6105,20 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2023-06-20T15:55:03+00:00" + "time": "2023-07-14T10:26:01+00:00" }, { "name": "laravel/sail", - "version": "v1.23.0", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "a2e046f748e87d3ef8b2b381e0e5c5a11f34e46b" + "reference": "62582606f80466aa81fba40b193b289106902853" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/a2e046f748e87d3ef8b2b381e0e5c5a11f34e46b", - "reference": "a2e046f748e87d3ef8b2b381e0e5c5a11f34e46b", + "url": "https://api.github.com/repos/laravel/sail/zipball/62582606f80466aa81fba40b193b289106902853", + "reference": "62582606f80466aa81fba40b193b289106902853", "shasum": "" }, "require": { @@ -6046,41 +6170,37 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2023-06-16T21:20:12+00:00" + "time": "2023-06-28T18:31:28+00:00" }, { "name": "mockery/mockery", - "version": "1.6.2", + "version": "1.6.4", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "13a7fa2642c76c58fa2806ef7f565344c817a191" + "reference": "d1413755e26fe56a63455f7753221c86cbb88f66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/13a7fa2642c76c58fa2806ef7f565344c817a191", - "reference": "13a7fa2642c76c58fa2806ef7f565344c817a191", + "url": "https://api.github.com/repos/mockery/mockery/zipball/d1413755e26fe56a63455f7753221c86cbb88f66", + "reference": "d1413755e26fe56a63455f7753221c86cbb88f66", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "^2.0.1", "lib-pcre": ">=7.0", - "php": "^7.4 || ^8.0" + "php": ">=7.4,<8.3" }, "conflict": { "phpunit/phpunit": "<8.0" }, "require-dev": { "phpunit/phpunit": "^8.5 || ^9.3", - "psalm/plugin-phpunit": "^0.18", - "vimeo/psalm": "^5.9" + "psalm/plugin-phpunit": "^0.18.4", + "symplify/easy-coding-standard": "^11.5.0", + "vimeo/psalm": "^5.13.1" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.6.x-dev" - } - }, "autoload": { "files": [ "library/helpers.php", @@ -6098,12 +6218,20 @@ { "name": "Pádraic Brady", "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" + "homepage": "https://github.com/padraic", + "role": "Author" }, { "name": "Dave Marshall", "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" } ], "description": "Mockery is a simple yet flexible PHP mock object framework", @@ -6121,10 +6249,13 @@ "testing" ], "support": { + "docs": "https://docs.mockery.io/", "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.6.2" + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories", + "source": "https://github.com/mockery/mockery" }, - "time": "2023-06-07T09:07:52+00:00" + "time": "2023-07-19T15:51:02+00:00" }, { "name": "myclabs/deep-copy", @@ -6187,16 +6318,16 @@ }, { "name": "nunomaduro/collision", - "version": "v7.6.0", + "version": "v7.7.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "87faf7bc1c42d7fef7c60ec5c143050ce2a6189a" + "reference": "69a07197d055456d29911116fca3bc2c985f524b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/87faf7bc1c42d7fef7c60ec5c143050ce2a6189a", - "reference": "87faf7bc1c42d7fef7c60ec5c143050ce2a6189a", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/69a07197d055456d29911116fca3bc2c985f524b", + "reference": "69a07197d055456d29911116fca3bc2c985f524b", "shasum": "" }, "require": { @@ -6209,18 +6340,18 @@ "phpunit/phpunit": "<10.1.2" }, "require-dev": { - "brianium/paratest": "^7.2.0", - "laravel/framework": "^10.13.5", - "laravel/pint": "^1.10.2", - "laravel/sail": "^1.22.0", + "brianium/paratest": "^7.2.2", + "laravel/framework": "^10.14.1", + "laravel/pint": "^1.10.3", + "laravel/sail": "^1.23.0", "laravel/sanctum": "^3.2.5", "laravel/tinker": "^2.8.1", "nunomaduro/larastan": "^2.6.3", - "orchestra/testbench-core": "^8.5.7", - "pestphp/pest": "^2", + "orchestra/testbench-core": "^8.5.8", + "pestphp/pest": "^2.8.1", "phpunit/phpunit": "^10.2.2", "sebastian/environment": "^6.0.1", - "spatie/laravel-ignition": "^2.1.3" + "spatie/laravel-ignition": "^2.2.0" }, "type": "library", "extra": { @@ -6279,7 +6410,7 @@ "type": "patreon" } ], - "time": "2023-06-15T10:51:08+00:00" + "time": "2023-06-29T09:10:16+00:00" }, { "name": "phar-io/manifest", @@ -6394,16 +6525,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "10.1.2", + "version": "10.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "db1497ec8dd382e82c962f7abbe0320e4882ee4e" + "reference": "be1fe461fdc917de2a29a452ccf2657d325b443d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/db1497ec8dd382e82c962f7abbe0320e4882ee4e", - "reference": "db1497ec8dd382e82c962f7abbe0320e4882ee4e", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/be1fe461fdc917de2a29a452ccf2657d325b443d", + "reference": "be1fe461fdc917de2a29a452ccf2657d325b443d", "shasum": "" }, "require": { @@ -6460,7 +6591,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.2" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.3" }, "funding": [ { @@ -6468,7 +6599,7 @@ "type": "github" } ], - "time": "2023-05-22T09:04:27+00:00" + "time": "2023-07-26T13:45:28+00:00" }, { "name": "phpunit/php-file-iterator", @@ -6714,16 +6845,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.2.2", + "version": "10.2.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "1ab521b24b88b88310c40c26c0cc4a94ba40ff95" + "reference": "1c17815c129f133f3019cc18e8d0c8622e6d9bcd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1ab521b24b88b88310c40c26c0cc4a94ba40ff95", - "reference": "1ab521b24b88b88310c40c26c0cc4a94ba40ff95", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1c17815c129f133f3019cc18e8d0c8622e6d9bcd", + "reference": "1c17815c129f133f3019cc18e8d0c8622e6d9bcd", "shasum": "" }, "require": { @@ -6795,7 +6926,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.2.2" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.2.6" }, "funding": [ { @@ -6811,7 +6942,7 @@ "type": "tidelift" } ], - "time": "2023-06-11T06:15:20+00:00" + "time": "2023-07-17T12:08:28+00:00" }, { "name": "sebastian/cli-parser", @@ -7323,16 +7454,16 @@ }, { "name": "sebastian/global-state", - "version": "6.0.0", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "aab257c712de87b90194febd52e4d184551c2d44" + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/aab257c712de87b90194febd52e4d184551c2d44", - "reference": "aab257c712de87b90194febd52e4d184551c2d44", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/7ea9ead78f6d380d2a667864c132c2f7b83055e4", + "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4", "shasum": "" }, "require": { @@ -7372,7 +7503,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.0" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.1" }, "funding": [ { @@ -7380,7 +7512,7 @@ "type": "github" } ], - "time": "2023-02-03T07:07:38+00:00" + "time": "2023-07-19T07:19:23+00:00" }, { "name": "sebastian/lines-of-code", @@ -7725,16 +7857,16 @@ }, { "name": "spatie/backtrace", - "version": "1.4.1", + "version": "1.5.3", "source": { "type": "git", "url": "https://github.com/spatie/backtrace.git", - "reference": "47794d19e3215ace9e005a8f200cd7cc7be52572" + "reference": "483f76a82964a0431aa836b6ed0edde0c248e3ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/backtrace/zipball/47794d19e3215ace9e005a8f200cd7cc7be52572", - "reference": "47794d19e3215ace9e005a8f200cd7cc7be52572", + "url": "https://api.github.com/repos/spatie/backtrace/zipball/483f76a82964a0431aa836b6ed0edde0c248e3ab", + "reference": "483f76a82964a0431aa836b6ed0edde0c248e3ab", "shasum": "" }, "require": { @@ -7771,7 +7903,7 @@ "spatie" ], "support": { - "source": "https://github.com/spatie/backtrace/tree/1.4.1" + "source": "https://github.com/spatie/backtrace/tree/1.5.3" }, "funding": [ { @@ -7783,26 +7915,27 @@ "type": "other" } ], - "time": "2023-06-13T14:35:04+00:00" + "time": "2023-06-28T12:59:17+00:00" }, { "name": "spatie/flare-client-php", - "version": "1.3.6", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/spatie/flare-client-php.git", - "reference": "530ac81255af79f114344286e4275f8869c671e2" + "reference": "5f2c6a7a0d2c1d90c12559dc7828fd942911a544" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/530ac81255af79f114344286e4275f8869c671e2", - "reference": "530ac81255af79f114344286e4275f8869c671e2", + "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/5f2c6a7a0d2c1d90c12559dc7828fd942911a544", + "reference": "5f2c6a7a0d2c1d90c12559dc7828fd942911a544", "shasum": "" }, "require": { "illuminate/pipeline": "^8.0|^9.0|^10.0", + "nesbot/carbon": "^2.62.1", "php": "^8.0", - "spatie/backtrace": "^1.2", + "spatie/backtrace": "^1.5.2", "symfony/http-foundation": "^5.0|^6.0", "symfony/mime": "^5.2|^6.0", "symfony/process": "^5.2|^6.0", @@ -7819,7 +7952,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.1.x-dev" + "dev-main": "1.3.x-dev" } }, "autoload": { @@ -7844,7 +7977,7 @@ ], "support": { "issues": "https://github.com/spatie/flare-client-php/issues", - "source": "https://github.com/spatie/flare-client-php/tree/1.3.6" + "source": "https://github.com/spatie/flare-client-php/tree/1.4.2" }, "funding": [ { @@ -7852,28 +7985,28 @@ "type": "github" } ], - "time": "2023-04-12T07:57:12+00:00" + "time": "2023-07-28T08:07:24+00:00" }, { "name": "spatie/ignition", - "version": "1.8.1", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/spatie/ignition.git", - "reference": "d8eb8ea1ed27f48a694405cff363746ffd37f13e" + "reference": "de24ff1e01814d5043bd6eb4ab36a5a852a04973" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ignition/zipball/d8eb8ea1ed27f48a694405cff363746ffd37f13e", - "reference": "d8eb8ea1ed27f48a694405cff363746ffd37f13e", + "url": "https://api.github.com/repos/spatie/ignition/zipball/de24ff1e01814d5043bd6eb4ab36a5a852a04973", + "reference": "de24ff1e01814d5043bd6eb4ab36a5a852a04973", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", "php": "^8.0", - "spatie/backtrace": "^1.4", - "spatie/flare-client-php": "^1.1", + "spatie/backtrace": "^1.5.3", + "spatie/flare-client-php": "^1.4.0", "symfony/console": "^5.4|^6.0", "symfony/var-dumper": "^5.4|^6.0" }, @@ -7885,7 +8018,7 @@ "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", "psr/simple-cache-implementation": "*", - "symfony/cache": "^6.2", + "symfony/cache": "^6.0", "symfony/process": "^5.4|^6.0", "vlucas/phpdotenv": "^5.5" }, @@ -7935,20 +8068,20 @@ "type": "github" } ], - "time": "2023-06-06T14:14:58+00:00" + "time": "2023-06-28T13:24:59+00:00" }, { "name": "spatie/laravel-ignition", - "version": "2.1.3", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ignition.git", - "reference": "35711943d4725aa80f8033e4f1cb3a6775530b25" + "reference": "dd15fbe82ef5392798941efae93c49395a87d943" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/35711943d4725aa80f8033e4f1cb3a6775530b25", - "reference": "35711943d4725aa80f8033e4f1cb3a6775530b25", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/dd15fbe82ef5392798941efae93c49395a87d943", + "reference": "dd15fbe82ef5392798941efae93c49395a87d943", "shasum": "" }, "require": { @@ -7958,7 +8091,7 @@ "illuminate/support": "^10.0", "php": "^8.1", "spatie/flare-client-php": "^1.3.5", - "spatie/ignition": "^1.5.0", + "spatie/ignition": "^1.9", "symfony/console": "^6.2.3", "symfony/var-dumper": "^6.2.3" }, @@ -8027,7 +8160,7 @@ "type": "github" } ], - "time": "2023-05-25T11:30:27+00:00" + "time": "2023-06-28T13:51:52+00:00" }, { "name": "symfony/yaml", diff --git a/site/config/image-optimizer.php b/site/config/image-optimizer.php new file mode 100644 index 0000000..08175fe --- /dev/null +++ b/site/config/image-optimizer.php @@ -0,0 +1,66 @@ + [ + + Jpegoptim::class => [ + '-m72', // set maximum quality to 85% + '--strip-all', // this strips out all text information such as comments and EXIF data + '--all-progressive', // this will make sure the resulting image is a progressive one + ], + + Pngquant::class => [ + '--force', // required parameter for this package + ], + + Optipng::class => [ + '-i0', // this will result in a non-interlaced, progressive scanned image + '-o2', // this set the optimization level to two (multiple IDAT compression trials) + '-quiet', // required parameter for this package + ], + + Svgo::class => [ + '--disable=cleanupIDs', // disabling because it is know to cause troubles + ], + + Gifsicle::class => [ + '-b', // required parameter for this package + '-O3', // this produces the slowest but best results + ], + + Cwebp::class => [ + '-m 6', // for the slowest compression method in order to get the best compression. + '-pass 10', // for maximizing the amount of analysis pass. + '-mt', // multithreading for some speed improvements. + '-q 90', // quality factor that brings the least noticeable changes. + ], + ], + + /* + * The directory where your binaries are stored. + * Only use this when you binaries are not accessible in the global environment. + */ + 'binary_path' => '', + + /* + * The maximum time in seconds each optimizer is allowed to run separately. + */ + 'timeout' => 60, + + /* + * If set to `true` all output of the optimizer binaries will be appended to the default log. + * You can also set this to a class that implements `Psr\Log\LoggerInterface`. + */ + 'log_optimizer_activity' => false, +]; diff --git a/site/config/logging.php b/site/config/logging.php index c44d276..85c9a66 100644 --- a/site/config/logging.php +++ b/site/config/logging.php @@ -65,6 +65,13 @@ 'replace_placeholders' => true, ], + 'artwork_import' => [ + 'driver' => 'single', + 'path' => storage_path('logs/artwork_import.log'), + 'level' => env('LOG_LEVEL', 'debug'), + 'replace_placeholders' => true, + ], + 'daily' => [ 'driver' => 'daily', 'path' => storage_path('logs/laravel.log'), diff --git a/site/database/factories/ArtistFactory.php b/site/database/factories/ArtistFactory.php index 031b943..522c245 100644 --- a/site/database/factories/ArtistFactory.php +++ b/site/database/factories/ArtistFactory.php @@ -29,7 +29,7 @@ public function definition() 'header' => fake()->imageUrl(270, 185), 'location' => fake()->city() . ', ' . fake()->state(), 'website' => rand(0, 1) ? fake()->url : null, - 'bio' => fake()->paragraphs(rand(1,3, true)), + 'bio' => fake()->paragraphs(rand(1, 3), true), ]; } } diff --git a/site/database/factories/ArtworkFactory.php b/site/database/factories/ArtworkFactory.php index 71321fc..f26e335 100644 --- a/site/database/factories/ArtworkFactory.php +++ b/site/database/factories/ArtworkFactory.php @@ -27,14 +27,18 @@ class ArtworkFactory extends Factory */ public function definition() { + $created = fake()->dateTimeThisDecade(); return [ 'title' => fake()->name(), - 'description' => rand(0, 1) ? fake()->paragraphs(rand((1, 3, true))) : null, + 'description' => rand(0, 1) ? fake()->paragraphs(rand(1, 3), true) : null, 'artist_id' => Artist::factory(), 'podcast_id' => Podcast::factory(), 'episode_id' => Episode::factory(), 'overlay_id' => rand(0, 1) ? Overlay::factory() : null, 'filename' => fake()->imageUrl(3000, 3000), + 'created_at' => $created, + 'updated_at' => $created, + 'legacy_id' => null, ]; } } diff --git a/site/database/factories/EpisodeFactory.php b/site/database/factories/EpisodeFactory.php index 66a1907..3df2251 100644 --- a/site/database/factories/EpisodeFactory.php +++ b/site/database/factories/EpisodeFactory.php @@ -2,11 +2,14 @@ namespace Database\Factories; +use App\Models\Artist; +use App\Models\Artwork; use App\Models\Episode; use App\Models\Podcast; -use App\Models\Artwork; +use App\Models\Overlay; use Illuminate\Database\Eloquent\Factories\Factory; - +use Carbon\Carbon; +use Illuminate\Support\Str; class EpisodeFactory extends Factory { @@ -24,11 +27,20 @@ class EpisodeFactory extends Factory */ public function definition() { + $title = fake()->name(); + $slug = Str::slug($title); + $created = fake()->dateTimeThisDecade(); return [ 'podcast_id' => Podcast::factory(), 'artwork_id' => Artwork::factory(), 'published' => fake()->boolean(), - 'title' => fake()->name() + 'episode_date' => fake()->dateTimeThisDecade(), + 'slug' => $slug, + 'title' => $title, + 'mp3' => fake()->url(), + 'created_at' => $created, + 'updated_at' => $created, + 'legacy_id' => null, ]; } } diff --git a/site/database/factories/OverlayFactory.php b/site/database/factories/OverlayFactory.php index b499373..8648b94 100644 --- a/site/database/factories/OverlayFactory.php +++ b/site/database/factories/OverlayFactory.php @@ -4,12 +4,23 @@ use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Str; -use App\Models\Podcast; use App\Models\Artist; +use App\Models\Artwork; +use App\Models\Episode; +use App\Models\Podcast; +use App\Models\Overlay; class OverlayFactory extends Factory { + + /** + * The name of the factory's corresponding model + * + * @var string + */ + protected $model = Overlay::class; + /** * Define the model's default state. * diff --git a/site/database/factories/PodcastFactory.php b/site/database/factories/PodcastFactory.php index 5dffb79..56d42e8 100644 --- a/site/database/factories/PodcastFactory.php +++ b/site/database/factories/PodcastFactory.php @@ -4,10 +4,21 @@ use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Str; +use App\Models\Artist; +use App\Models\Artwork; +use App\Models\Episode; use App\Models\Podcast; +use App\Models\Overlay; class PodcastFactory extends Factory { + /** + * The name of the factory's corresponding model + * + * @var string + */ + protected $model = Podcast::class; + /** * Define the model's default state. * diff --git a/site/database/factories/UserFactory.php b/site/database/factories/UserFactory.php index d76bbb2..f5f23e5 100644 --- a/site/database/factories/UserFactory.php +++ b/site/database/factories/UserFactory.php @@ -5,9 +5,22 @@ use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Str; use Illuminate\Support\Facades\Hash; +use App\Models\Artist; +use App\Models\Artwork; +use App\Models\Episode; +use App\Models\Podcast; +use App\Models\Overlay; +use App\Models\User; + class UserFactory extends Factory { + /** + * The name of the factory's corresponding model + * + * @var string + */ + protected $model = User::class; /** * Define the model's default state. * diff --git a/site/database/migrations/2022_01_22_212210_create_artists_table.php b/site/database/migrations/2022_01_22_212210_create_artists_table.php index 8c4d449..5936626 100644 --- a/site/database/migrations/2022_01_22_212210_create_artists_table.php +++ b/site/database/migrations/2022_01_22_212210_create_artists_table.php @@ -3,6 +3,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; +use App\Models\User; class CreateArtistsTable extends Migration { diff --git a/site/database/migrations/2023_07_31_051521_add_episode_number_to_podcasts.php b/site/database/migrations/2023_07_31_051521_add_episode_number_to_podcasts.php new file mode 100644 index 0000000..ddf65d1 --- /dev/null +++ b/site/database/migrations/2023_07_31_051521_add_episode_number_to_podcasts.php @@ -0,0 +1,28 @@ +decimal('episode_number', 8, 1)->after('episode_date')->default(0); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('episodes', function (Blueprint $table) { + $table->dropColumn('episode_number'); + }); + } +}; diff --git a/site/database/migrations/2023_08_01_035006_add_legacy_id_to_artworks.php b/site/database/migrations/2023_08_01_035006_add_legacy_id_to_artworks.php new file mode 100644 index 0000000..07e7d4b --- /dev/null +++ b/site/database/migrations/2023_08_01_035006_add_legacy_id_to_artworks.php @@ -0,0 +1,28 @@ +bigInteger('legacy_id')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('artworks', function (Blueprint $table) { + $table->dropColumn('legacy_id'); + }); + } +}; diff --git a/site/database/migrations/2023_08_01_154515_add_legacy_id_to_episodes_table.php b/site/database/migrations/2023_08_01_154515_add_legacy_id_to_episodes_table.php new file mode 100644 index 0000000..d734911 --- /dev/null +++ b/site/database/migrations/2023_08_01_154515_add_legacy_id_to_episodes_table.php @@ -0,0 +1,28 @@ +bigInteger('legacy_id')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('episodes', function (Blueprint $table) { + $table->dropColumn('legacy_id'); + }); + } +}; diff --git a/site/database/seeders/EpisodeSeeder.php b/site/database/seeders/EpisodeSeeder.php new file mode 100644 index 0000000..13b0f2e --- /dev/null +++ b/site/database/seeders/EpisodeSeeder.php @@ -0,0 +1,60 @@ +getResponseFromApi($current_page); + $last_page = $response->object()->last_page; + $this->command->info('Last Page: ' . $last_page); + $podcast = Podcast::find(1); + while ($current_page <= $last_page) { + $this->command->info('Getting Page ' . $current_page); + foreach ($response->object()->data as $episode) { + $podcastEpisode = Episode::where('title', $episode->title)->first(); + if (!$podcastEpisode) { + $podcastEpisode = Episode::factory()->state([ + 'podcast_id' => 1, + 'episode_date' => Carbon::parse($episode->show_date), + 'published' => (bool)$episode->published, + 'artwork_id' => null, + 'slug' => $episode->episode_number . '_' . Str::slug($episode->title), + 'title' => $episode->title, + 'mp3' => $episode->link, + 'created_at' => Carbon::parse($episode->created_at), + 'updated_at' => Carbon::parse($episode->updated_at), + 'legacy_id' => $episode->id ?? null + ])->create(); + } else { + $podcastEpisode->legacy_id = $episode->id ?? null; + if ($podcastEpisode->isDirty()) { + $podcastEpisode->save(); + } + } + $this->command->info('Created ' . $episode->show_date . ' - (' . $episode->episode_number . ') ' . $episode->title); + } + $current_page++; + $response = $this->getResponseFromApi($current_page); + } + } + + private function getResponseFromApi($current_page) { + $response = Http::timeout(180) + ->get('https://noagendaartgenerator.com/episodesjson?p=7476&page=' . $current_page); + return $response; + } +} diff --git a/site/database/seeders/FixLegacyEpisodeSeeder.php b/site/database/seeders/FixLegacyEpisodeSeeder.php new file mode 100644 index 0000000..0b3e8b0 --- /dev/null +++ b/site/database/seeders/FixLegacyEpisodeSeeder.php @@ -0,0 +1,31 @@ +episode_number) || $episode->episode_number == 0) { + $ep_num_arr = explode('_', $episode->slug); + $episode->episode_number = $ep_num_arr[0]; + } + if ($episode->isDirty()) { + $episode->save(); + } + } + } +} diff --git a/site/database/seeders/MapLegacyIdsSeeder.php b/site/database/seeders/MapLegacyIdsSeeder.php new file mode 100644 index 0000000..9f02a50 --- /dev/null +++ b/site/database/seeders/MapLegacyIdsSeeder.php @@ -0,0 +1,17 @@ +createPodcast($name, $description, $website, $slug, $feed, $added); - + + $name = 'The Boostagram Ball'; + $description = 'The First Podcast with Value4Value Music hosted by Adam Curry'; + $website = 'https://boostagramball.com'; + $slug = 'boostagram-ball'; + $feed = 'https://mp3s.nashownotes.com/bballrss.xml'; + $added = '2023-07-29 20:00:00'; + $this->createPodcast($name, $description, $website, $slug, $feed, $added); } private function createPodcast($name, $description, $website, $slug, $feed, $added) { diff --git a/site/database/seeders/SeedFromOldApiSeeder.php b/site/database/seeders/SeedFromOldApiSeeder.php new file mode 100644 index 0000000..f5eab2b --- /dev/null +++ b/site/database/seeders/SeedFromOldApiSeeder.php @@ -0,0 +1,105 @@ +populateLegacyArtworks(); + //die(); + $current_page = 283; + $totalArtworks = 0; + $missingArtworks = 0; + $missingModel = 0; + $response = $this->getResponseFromApi($current_page); + $last_page = $response->object()->users->last_page; + while ($current_page <= $last_page) { + $this->command->info('Getting Page ' . $current_page); + foreach ($response->object()->users->data as $user) { + $this->command->line('Getting Art for ' . $user->profile->name . ', found ' . count($user->artworks) . ' artworks.'); + $totalArtworks += count($user->artworks); + $legacyUser = Artist::where('name', $user->profile->name)->first(); + if (!$legacyUser) { + ImportLegacyUserJob::dispatch($user); + } else { + if ($legacyUser->artworks->count() < count($user->artworks)) { + $countDiff = count($user->artworks) - $legacyUser->artworks->count(); + $missingArtworks += $countDiff; + $this->command->comment('Artist ID ' + . $legacyUser->id + . ' ' + . $legacyUser->name + . ' has ' + . $legacyUser->artworks->count() + . ' artworks.'); + $this->command->error('Missing ' . $countDiff . ' artworks.'); + foreach ($user->artworks as $artwork) { + $date = Carbon::parse($artwork->created_at); + $basename = $date->format('Y') + . '/' . $date->format('m') + . '/' . Str::slug($legacyUser->name) + . '-' . Str::slug($artwork->title) + . '_' . $artwork->id . '.jpg'; + if (Storage::disk('static')->exists('artworks/' . $basename)) { + $artworkModel = Artwork::where('filename', $basename)->first(); + if (!$artworkModel) { + $missingModel++; + $this->command->error($basename . ' exists.'); + StashAndOptimizeLegacyArtworkJob::dispatch($legacyUser, $artwork); + } + } + + } + } else { + $this->command->line('Locally stored all of ' . $legacyUser->name . '\'s artworks.'); + } + } + } + $current_page++; + $response = $this->getResponseFromApi($current_page); + } + $this->command->info('Total Artworks: ' . $totalArtworks); + $this->command->info('Total Missing: ' . $missingArtworks); + $this->command->info('Total Missing Model: ' . $missingModel); + } + + private function getResponseFromApi($current_page) { + $response = Http::timeout(180) + ->get('https://noagendaartgenerator.com/artistapi', + [ + 'p' => '7476', + 'page' => $current_page, + ] + ); + return $response; + } + + private function populateLegacyArtworks() { + $artworks = Artwork::whereNull('legacy_id')->get(); + foreach ($artworks as $artwork) { + $file = pathinfo($artwork->filename); + $filename = explode('_', $file['filename']); + $legacy_id = end($filename); + $artwork->legacy_id = $legacy_id; + $artwork->save(); + } + } +} diff --git a/site/resources/scss/components/_hero.scss b/site/resources/scss/components/_hero.scss index fb26833..a104af2 100644 --- a/site/resources/scss/components/_hero.scss +++ b/site/resources/scss/components/_hero.scss @@ -64,6 +64,7 @@ align-items: center; min-height: 100vh; padding-top: 50px; + padding-bottom: 50px; @include lg-device { padding: 180px 0 170px; min-height: auto; @@ -143,6 +144,7 @@ } } + // hero banner style two .hero-banner-style-2 { .banner-content { diff --git a/site/resources/scss/components/_light-version.scss b/site/resources/scss/components/_light-version.scss index ef6cb43..ed47785 100644 --- a/site/resources/scss/components/_light-version.scss +++ b/site/resources/scss/components/_light-version.scss @@ -186,7 +186,7 @@ body { .bg-4, .bg-3, .bg-5 { - background-image: none; + background-image: url(../img/headerbg.jpg); background-color: $body-bg-light; } diff --git a/site/resources/views/home/hero/banner-left.blade.php b/site/resources/views/home/hero/banner-left.blade.php new file mode 100644 index 0000000..fcb00c0 --- /dev/null +++ b/site/resources/views/home/hero/banner-left.blade.php @@ -0,0 +1,21 @@ +
\ No newline at end of file diff --git a/site/resources/views/home/hero/counter.blade.php b/site/resources/views/home/hero/counter.blade.php new file mode 100644 index 0000000..827b1a3 --- /dev/null +++ b/site/resources/views/home/hero/counter.blade.php @@ -0,0 +1,7 @@ +