hypothetical/app/Providers/AppServiceProvider.php

33 lines
742 B
PHP
Raw Normal View History

<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema;
2019-03-19 17:40:13 -04:00
use Illuminate\Support\Facades\Blade;
class AppServiceProvider extends ServiceProvider
{
2019-03-19 17:40:13 -04:00
/**
* Register any application services.
*/
2023-03-13 17:33:19 -04:00
public function register(): void
2019-03-19 17:40:13 -04:00
{
//
}
/**
* Bootstrap any application services.
*/
2023-03-13 17:33:19 -04:00
public function boot(): void
{
// Fix for migrations on older versions of mysql and mariadb
Schema::defaultStringLength(191);
// Add the lang blade directive for multi-language support
Blade::directive('lang', function($expression) {
return "<?php echo Language::select($expression); ?>";
});
}
}