Last active
January 11, 2017 11:21
-
-
Save escuccim/579f5e8324e322bcdb006ed8dd45b00d to your computer and use it in GitHub Desktop.
Laravel MetaData translation file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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