Use this in your blade layout:
<title>{{ trans('pages.'.Route::currentRouteName().'.title').trans('pages.title-suffix') }}</title>
<meta name="description" content="{{ trans('pages.'.Route::currentRouteName().'.description') }}" />
<meta name="keywords" content="{{ trans('pages.obligatory-keywords').trans('pages.'.Route::currentRouteName().'.keywords') }}" />
An example for lang//pages.php:
<?php
return array(
'title-suffix' => ' | The Website',
'obligatory-keywords' => 'these,are,obligatory,keywords,',
'home' => array(
'title' => 'Home',
'keywords' => 'home',
'description' => 'This is an example website.',
),
);
This is nice! Is it possible to use this when parts of the title are dynamic?