This commit is contained in:
rico-vz
2025-03-04 11:50:42 +00:00
committed by GitHub Action
parent 68d18311b4
commit 651b6f449e
5 changed files with 11 additions and 11 deletions

View File

@@ -90,7 +90,7 @@ function getChampionImage($full_id, $type): string
function getCommitHash(): string
{
/** @var string $commit */
$commit = Cache::remember('commit_hash', 60 * 72, fn() => trim(exec('git log --pretty="%h" -n1 HEAD')));
$commit = Cache::remember('commit_hash', 60 * 72, fn () => trim(exec('git log --pretty="%h" -n1 HEAD')));
return $commit;
}

View File

@@ -23,7 +23,7 @@ class ContactSubmissionController extends Controller
$descriptionContent .= '
**Discord**: ' . $contactSubmission->discord;
**Discord**: '.$contactSubmission->discord;
}
DiscordAlert::message(sprintf('There is a new contact submission from %s (%s).', $contactSubmission->name, $contactSubmission->email), [

View File

@@ -10,7 +10,7 @@ class PostsController extends Controller
{
public function index()
{
$posts = Sheets::all()->filter(fn($post) => ! $post->hidden)->sortByDesc('date');
$posts = Sheets::all()->filter(fn ($post) => ! $post->hidden)->sortByDesc('date');
$paginatedPosts = Paginate::collection($posts, 6);
return view('posts.index', [

View File

@@ -28,11 +28,11 @@ class Streamer extends Model
public function getStreamerUrlAttribute(): string
{
return match ($this->platform) {
'Twitch' => 'https://www.twitch.tv/' . $this->username,
'YouTube' => 'https://www.youtube.com/@' . $this->username,
'Kick' => 'https://kick.com/' . $this->username,
'Douyu' => 'https://www.douyu.com/' . $this->username,
'Huya' => 'https://www.huya.com/' . $this->username,
'Twitch' => 'https://www.twitch.tv/'.$this->username,
'YouTube' => 'https://www.youtube.com/@'.$this->username,
'Kick' => 'https://kick.com/'.$this->username,
'Douyu' => 'https://www.douyu.com/'.$this->username,
'Huya' => 'https://www.huya.com/'.$this->username,
};
}

View File

@@ -46,14 +46,14 @@ class AppServiceProvider extends ServiceProvider
public function bootAuth(): void
{
Gate::define('viewPulse', fn(User $user) => $user->admin);
Gate::define('viewPulse', fn (User $user) => $user->admin);
}
public function bootRoute(): void
{
RateLimiter::for('api', fn(Request $request) => Limit::perMinute(60)->by($request->user()?->id ?: $request->ip()));
RateLimiter::for('api', fn (Request $request) => Limit::perMinute(60)->by($request->user()?->id ?: $request->ip()));
Route::bind('post', fn($path) => $this->app->make(Sheets::class)
Route::bind('post', fn ($path) => $this->app->make(Sheets::class)
->collection('posts')
->get($path) ?? abort(404));
}