Ajoute les filtres

This commit is contained in:
2020-07-24 11:06:49 +02:00
committed by Gogs
parent a214c47cfd
commit 21bc5b2ab2
4 changed files with 63 additions and 12 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str;
class AppServiceProvider extends ServiceProvider
{
@@ -23,6 +24,9 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot()
{
//
Str::macro('currency', static function ($price)
{
return sprintf('%s €', number_format($price, 0, ',', ' '));
});
}
}