💄 Ajoute des espaces insécables et formate les prix et surfaces
Ajoute aussi des icônes pour faire joli Fix #10 Fix #9
This commit is contained in:
@@ -27,5 +27,12 @@ class AppServiceProvider extends ServiceProvider
|
||||
Str::macro('currency', static function ($price) {
|
||||
return sprintf('%s €', number_format($price, 0, ',', ' '));
|
||||
});
|
||||
|
||||
Str::macro('surface', static function ($surface) {
|
||||
if (empty($surface)) {
|
||||
return '';
|
||||
}
|
||||
return sprintf('%s m²', number_format($surface, 0, ',', ' '));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user