-
app/helpers.php
Open in GitHubfunction gravatar(string $name): string { $gravatarId = md5(strtolower(trim($name))); return 'https://gravatar.com/avatar/'.$gravatarId.'?s=240'; } function formatNaturalNumber(int $number): string { return number_format($number, 0, '.', ' '); }
-
resources/views/components/tiles/statistics.blade.php
Open in GitHub<li class="py-1 grid grid-cols-1-auto"> <span>✨</span> <span class="font-bold tabular-nums"> {{ formatNaturalNumber($gitHubStars) }} </span> </li> <li class="py-1 grid grid-cols-1-auto"> <span>Contributors</span> <span class="font-bold tabular-nums"> {{ formatNaturalNumber($gitHubContributors) }} </span> </li>
-
resources/views/dashboard.blade.php
Open in GitHub<x-dashboard> <livewire:twitter-tile position="a1:a14" /> <livewire:team-member-tile position="b1:b8" name="adriaan" :avatar="gravatar('adriaan@spatie.be')" birthday="1995-10-22" /> <livewire:team-member-tile position="c1:c8" name="alex" :avatar="gravatar('alex@spatie.be')" birthday="1996-02-05" /> </x-dashboard>
-
composer.json
Open in GitHub{ "require": { "php": "^7.4", "barryvdh/laravel-ide-helper": "^2.1", /// ... }, "autoload": { "files": [ "app/helpers.php" ] }, // ... other settings }