MyHomeCollection/app/Providers/AppServiceProvider.php
2020-07-27 12:50:46 +02:00

32 lines
564 B
PHP

<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Str::macro('currency', static function ($price) {
return sprintf('%s €', number_format($price, 0, ',', ' '));
});
}
}