mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 10:10:48 +01:00
Dusting
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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), [
|
||||
|
||||
@@ -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', [
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user