fix: migrating to bare metal.
This commit is contained in:
		
							parent
							
								
									ac28e86e68
								
							
						
					
					
						commit
						1d56e833a8
					
				
							
								
								
									
										38
									
								
								site/app/Console/Commands/RefreshLeaderBoardCacheCommand.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								site/app/Console/Commands/RefreshLeaderBoardCacheCommand.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,38 @@ | ||||
| <?php | ||||
| 
 | ||||
| namespace App\Console\Commands; | ||||
| 
 | ||||
| use Illuminate\Console\Command; | ||||
| use App\Models\Artwork; | ||||
| use App\Models\Episode; | ||||
| use Illuminate\Support\Facades\DB; | ||||
| 
 | ||||
| class RefreshLeaderBoardCacheCommand extends Command | ||||
| { | ||||
|      /** | ||||
|      * The name and signature of the console command. | ||||
|      * | ||||
|      * @var string | ||||
|      */ | ||||
|     protected $signature = 'naart:leaderboard-cache'; | ||||
| 
 | ||||
|     /** | ||||
|      * The console command description. | ||||
|      * | ||||
|      * @var string | ||||
|      */ | ||||
|     protected $description = 'Clears all leaderboard caches.'; | ||||
| 
 | ||||
|     /** | ||||
|      * Execute the console command. | ||||
|      */ | ||||
|     public function handle() | ||||
|     { | ||||
|         $this->line('Clearing Leaderboard Caches...'); | ||||
|         cache()->forget('leaderboardTwelveMonths'); | ||||
|         cache()->forget('leaderboardTwelveMonthsLanding'); | ||||
|         cache()->forget('leaderboardAllTime'); | ||||
|         cache()->forget('leaderboardRollingSixMonth'); | ||||
|         cache()->forget('leaderboardNinetyDays'); | ||||
|     } | ||||
| } | ||||
| @ -109,6 +109,7 @@ class ArtworkController extends Controller | ||||
|             'overlay_id'  => null, | ||||
|             'podcast_id'  => $podcast->id, | ||||
| 	        'episode_id'  => $episode->id, | ||||
| 	    //'approved_by' => 4,
 | ||||
|             'filename'    => $filename, | ||||
|             'created_at'  => now(), | ||||
|             'updated_at'  => now(), | ||||
|  | ||||
| @ -10,6 +10,7 @@ | ||||
|                 alt="{{ $thisArtwork->title }} by {{ $thisArtwork->artist->name }}"> | ||||
|         </a> | ||||
|     </div> | ||||
| 
 | ||||
|     {{-- End .thumb --}} | ||||
|     <div class="content"> | ||||
|         <div class="header d-flex-between pt-4 pb-1"> | ||||
|  | ||||
| @ -5,7 +5,7 @@ | ||||
|     <div class="content"> | ||||
|         <a href="/artist/{{ $artist->slug }}"><img class="author-thumb avatar_img" src="{{ $artist->avatar() }}" | ||||
|             alt="{{ $artist->name }}" /></a> | ||||
|         <h4 class="title"><a href="/artists/{{ $artist->slug }}">{{ $artist->name }}</a></h4> | ||||
|         <h4 class="title"><a href="/artist/{{ $artist->slug }}">{{ $artist->name }}</a></h4> | ||||
|         <p class="title">{{  $artist->location ?? 'No Agenda Nation' }}</p> | ||||
|         <p class="title">Artist For {{ $artist->artworks->sortBy('created_at')->first()->created_at->diffForHumans(now(), Carbon\CarbonInterface::DIFF_ABSOLUTE) }}</p> | ||||
|         @if ($artist->bio) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user