Skip to content

Instantly share code, notes, and snippets.

Last active Jan 11, 2017
What would you like to do?
Laravel MetaData translation file
return [
'default-title' => 'Default page title',
'default-description' => 'My whatever whatever web site default description text',
'/termsandconditions-title' => 'Terms and Conditions',
'/termsandconditions-description' => 'Terms and conditions for the website',
'/privacypolicy-title' => 'Privacy Policy',
'/privacypolicy-description' => 'Privacy policy for the website',
// and add the following to the app.blade.php layout file:
// <meta name="description" content="{!! getMetaData('description') !!}">
// <title>{{ getMetaData('title') }}</title>
// with helper function will get and display meta data for each page from translation file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment