mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 18:20:48 +01:00
Merge remote-tracking branch 'origin/analysis-VBpArV' into streamers
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests\StoreChampionRequest;
|
||||
use App\Http\Requests\UpdateChampionRequest;
|
||||
use App\Models\Champion;
|
||||
use App\Models\ChampionRoles;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
@@ -32,12 +30,12 @@ class ChampionController extends Controller
|
||||
$threeDaysInSeconds = 60 * 60 * 24 * 3;
|
||||
$sixMonthsInSeconds = 60 * 60 * 24 * 30 * 6;
|
||||
|
||||
$champion = Cache::remember('championShowCache' . $champion->slug, $threeDaysInSeconds, static fn () => $champion->load('streamers', 'skins', 'lanes'));
|
||||
$champion = Cache::remember('championShowCache'.$champion->slug, $threeDaysInSeconds, static fn () => $champion->load('streamers', 'skins', 'lanes'));
|
||||
|
||||
$streamers = $champion->load('streamers')->streamers;
|
||||
|
||||
$splashColor = Cache::remember(
|
||||
'championSplashColorCache' . $champion->slug,
|
||||
'championSplashColorCache'.$champion->slug,
|
||||
$sixMonthsInSeconds,
|
||||
static fn () => getAverageColorFromImageUrl($champion->getChampionImageAttribute())
|
||||
);
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Streamer;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
|
||||
|
||||
class StreamerController extends Controller
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Streamer;
|
||||
use App\Models\Champion;
|
||||
use App\Models\Streamer;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use App\Models\Champion;
|
||||
|
||||
class Streamer extends Model
|
||||
{
|
||||
@@ -13,7 +12,6 @@ class Streamer extends Model
|
||||
|
||||
protected $fillable = ['champion_id', 'platform', 'username', 'displayname'];
|
||||
|
||||
|
||||
public function getPlatformAttribute($value): string
|
||||
{
|
||||
$platforms = [
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
|
||||
namespace App\View\Components\Streamerpanel;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\View\Component;
|
||||
use App\Models\Streamer;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\View\Component;
|
||||
|
||||
class StreamersTable extends Component
|
||||
{
|
||||
|
||||
@@ -21,8 +21,6 @@ return new class extends Migration
|
||||
$table->foreign('champion_id')->references('champion_id')->on('champions')->onDelete('cascade');
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ use App\Http\Controllers\SummonerIconController;
|
||||
use App\Http\Requests\ContactSubmissionRequest;
|
||||
use App\Models\Champion;
|
||||
use App\Models\SummonerIcon;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Spatie\Honeypot\ProtectAgainstSpam;
|
||||
use Spatie\Sheets\Sheet;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user