app
Console
Exceptions
Http
Parser
Providers
AppServiceProvider.php
AuthServiceProvider.php
BroadcastServiceProvider.php
EventServiceProvider.php
RouteServiceProvider.php
Home.php
ParsedHome.php
Parser.php
User.php
bootstrap
config
database
public
resources
routes
storage
tests
.editorconfig
.env.example
.gitattributes
.gitignore
.styleci.yml
README.md
artisan
composer.json
composer.lock
package-lock.json
package.json
phpunit.xml
server.php
webpack.mix.js
39 lines
788 B
PHP
39 lines
788 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, ',', ' '));
|
|
});
|
|
|
|
Str::macro('surface', static function ($surface) {
|
|
if (empty($surface)) {
|
|
return '';
|
|
}
|
|
return sprintf('%s m²', number_format($surface, 0, ',', ' '));
|
|
});
|
|
}
|
|
}
|