improve app setup
This commit is contained in:
parent
fda6899202
commit
74dc46c1e5
1 changed files with 6 additions and 2 deletions
|
|
@ -57,11 +57,15 @@ class AppServiceProvider extends ServiceProvider
|
|||
}
|
||||
View::share('published_tags', $tags);
|
||||
|
||||
//this is useful when setting up the app whene settings table doesn't exist yet
|
||||
try {
|
||||
$front_settings = Setting::where('key', 'LIKE', 'theme_%')->get();
|
||||
} catch (QueryException $e) {
|
||||
$front_settings = null;
|
||||
}
|
||||
//front theme settings
|
||||
$front_settings = Setting::where('key', 'LIKE', 'theme_%')->get();
|
||||
View::share('front_settings', $front_settings);
|
||||
|
||||
|
||||
Blade::directive('fmt_currency', function ($expression) {
|
||||
return "<?php echo sprintf('%s € TTC', number_format($expression, 2, ',', ' ')); ?>";
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue