Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

Astrotomic/opendor.me

79 stars
1 code files
View Astrotomic/opendor.me on GitHub

app/Providers/AppServiceProvider.php

Open in GitHub
use App\Repositories\GithubSponsorRepository;
use Illuminate\Support\ServiceProvider;
use Kevinrob\GuzzleCache\CacheMiddleware;
use Kevinrob\GuzzleCache\Storage\LaravelCacheStorage;
use Kevinrob\GuzzleCache\Strategy\PrivateCacheStrategy;
use Stillat\Numeral\Languages\LanguageManager;
use Illuminate\Support\Facades\Cache;
 
class AppServiceProvider extends ServiceProvider
{
public function register(): void
{
$this->app->singleton(Numeral::class, static function (): Numeral {
$numeral = new Numeral();
$numeral->setLanguageManager(new LanguageManager());
 
return $numeral;
});
 
$this->app->singleton(CacheMiddleware::class, function (): CacheMiddleware {
return new CacheMiddleware(
new PrivateCacheStrategy(
new LaravelCacheStorage(
Cache::store()
)
)
);
});
 
$this->app->singleton(GithubSponsorRepository::class);
}
//
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.