All Projects → astroanu → Laravel Seo Gen

astroanu / Laravel Seo Gen

SEO friendly meta tags generator for Laravel

Projects that are alternatives of or similar to Laravel Seo Gen

Seo Manager
Seo Manager Package for Laravel ( with Localization )
Stars: ✭ 192 (+2642.86%)
Mutual labels:  metadata, laravel
Laravel Meta
Metadata for Eloquent model
Stars: ✭ 124 (+1671.43%)
Mutual labels:  metadata, laravel
Laravel Aws Sns
Laravel package for the AWS SNS Events
Stars: ✭ 24 (+242.86%)
Mutual labels:  laravel
Lighthouse Utils
An add-on to Lighthouse to auto-generate CRUD actions from types https://github.com/nuwave/lighthouse
Stars: ✭ 26 (+271.43%)
Mutual labels:  laravel
Community
General discussion, cross-repo efforts and common information for projects in the community.
Stars: ✭ 24 (+242.86%)
Mutual labels:  metadata
Laravel Tools
路飞laravel工具
Stars: ✭ 24 (+242.86%)
Mutual labels:  laravel
Blade Migrations Laravel
An intelligent alternative version of Laravel 5/6 Database Migrations - uses raw-sql syntax, transactions, auto-rollback, UP-DOWN-UP testing
Stars: ✭ 25 (+257.14%)
Mutual labels:  laravel
Pagarme Laravel
Pagar.me SDK for Laravel applications.
Stars: ✭ 23 (+228.57%)
Mutual labels:  laravel
Laravel Restaurant Pos
Restaurant POS
Stars: ✭ 27 (+285.71%)
Mutual labels:  laravel
Laraciproid
Indonesia city and province data migration and seeder for Laravel.
Stars: ✭ 24 (+242.86%)
Mutual labels:  laravel
Laravel6 Frontend Boilerplate
A Vue.js Frontend starter project kit template/boilerplate with Laravel 6 Backend API support.
Stars: ✭ 26 (+271.43%)
Mutual labels:  laravel
Barryvanveen
📰 Personal blog of Barry van Veen. Focuses on Laravel Framework, website optimization and natural computing.
Stars: ✭ 24 (+242.86%)
Mutual labels:  laravel
Laravel Mqtt Publish
A laravel mqtt publisher
Stars: ✭ 24 (+242.86%)
Mutual labels:  laravel
Socialite Mailru
MailRu OAuth2 Provider for Laravel Socialite
Stars: ✭ 25 (+257.14%)
Mutual labels:  laravel
Eloquent Filter
This simple package helps you filter Eloquent data using query filters.
Stars: ✭ 24 (+242.86%)
Mutual labels:  laravel
Laravel Pwa
Laravel with Progressive Web Apps (PWA)
Stars: ✭ 26 (+271.43%)
Mutual labels:  laravel
Beautymail
Send beautiful HTML emails with Laravel
Stars: ✭ 923 (+13085.71%)
Mutual labels:  laravel
Sentry Laravel
Laravel SDK for Sentry
Stars: ✭ 927 (+13142.86%)
Mutual labels:  laravel
Paytabs With Laravel
it's a PACKAGE helps in integration paytabs payment gateway with laravel framework, If you are interested to know How it's working, Watch this youtube video below
Stars: ✭ 25 (+257.14%)
Mutual labels:  laravel
Laravel Relationships Data
Migrations, seeders and factories to get up and running with various relationship types data quickly
Stars: ✭ 27 (+285.71%)
Mutual labels:  laravel

laravel-seo-gen

SEO friendly meta tags generator for Laravel

Usage

add the provider to config\app.php:

'Astroanu\SEOGen\SEOGenProvider'

run php artisan vendor:publish to copy the config file.

	'meta' => [
	
		'default_title' => 'My App', // default title for application
		'concat_default_title' => true, // wheatehr to concat the default title with the provided title. if this is true and if a title if provided in the controller the result would be "provided title : My App"
		'concat_with' => ' : ' // the string to concat the titles

	],

	'social' => [

		'og' => [
			'render' => true, // wheather to render facebook og tags or not
			'additional_og_tags' => [] // additinal tags to consider when rendering og tags
		],
		
		'twitter' => [
			'render' => true // wheather to render twitter meta tags or not
		]

	]	

In the base controller:

abstract class Controller extends BaseController {

	protected $metaData;

	public function __construct()
	{
		$this->metaData = new \Astroanu\SEOGen\Data();		
	}

}

in the controller set the tag attributes and pass them to the view:

$this->metaData->title = 'Welcome';
$this->metaData->description = 'Some demo text here for you to see';
$this->metaData->robots = 'noindex,nofollow';
$this->metaData->image = 'http://www.sample.com/image.jpg';

return view('welcome', ['metaData' => $this->metaData]);

in the view render everything:

<?php \Astroanu\SEOGen\Renderer::render($metaData); ?>

Example

// config

return 	array(

	'meta' => [
	
		'default_title' => 'My App',
		'concat_default_title' => true,
		'concat_with' => ' : '

	],

	'social' => [

		'og' => [
			'render' => true,
			'additional_og_tags' => ['fb__app_id', 'test_tag']
		],
		
		'twitter' => [
			'render' => true
		]

	]
	
);

// controller

$this->metaData->title = 'Welcome';
$this->metaData->description = 'Some demo text here for you to see';
$this->metaData->robots = 'noindex,nofollow';
$this->metaData->image = 'http://www.sample.com/image.jpg';
$this->metaData->fb__app_id = '456456456456'; // double underscore will be treated as a namespace
$this->metaData->test_tag = 'test text'; // this will still render as a meta tag

return view('welcome', ['metaData' => $this->metaData]);

will yeild:

<title>Welcome : My App</title>
<meta name="description" content="Some demo text here for you to see" />
<meta name="robots" content="noindex,nofollow" />
<meta name="image" content="http://www.sample.com/image.jpg" />
<meta property="og:title" content="Welcome" />
<meta property="og:description" content="Some demo text here for you to see" />
<meta property="og:image" content="http://www.sample.com/image.jpg" />
<meta property="fb:app_id" content="456456456456" />
<meta property="test_tag" content="test text" />
<meta property="twitter:title" content="Welcome" />
<meta property="twitter:description" content="Some demo text here for you to see" />
<meta property="twitter:image" content="http://www.sample.com/image.jpg" />
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].