Skip to content

Instantly share code, notes, and snippets.

@escuccim
Last active January 11, 2017 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save escuccim/579f5e8324e322bcdb006ed8dd45b00d to your computer and use it in GitHub Desktop.
Save escuccim/579f5e8324e322bcdb006ed8dd45b00d to your computer and use it in GitHub Desktop.
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