Skip to content

David-Kurniawan/laraseo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LaraSeo

Just simple package for my daily activity.

Installation

Via Composer

$ composer require david-kurniawan/laraseo

Usage

In your Controller

use LaraSeo;
use LaraOpenGraph;
use LaraTwitterCard;

// Meta
LaraSeo::setTitle('Foo');
LaraSeo::setDescription('Foo bar');
LaraSeo::setLanguage('en-US');
LaraSeo::setAuthor(env('APP_NAME'));
LaraSeo::setGenerator(url('/'));
LaraSeo::setRegion('EN');
LaraSeo::setCanonical(url()->current());
LaraSeo::setHrefLang(url()->current());

// Opengraph
LaraOpenGraph::setTitle('Foo');
LaraOpenGraph::setDescription('Foo bar');
LaraOpenGraph::setUrl(url()->current());
LaraOpenGraph::setSiteName(env('APP_NAME'));
LaraOpenGraph::setType('website');
LaraOpenGraph::setImage('https://d1s5saizp11buw.cloudfront.net/airy-web/images/seo-landing-banner.jpg');

// Twitter Card
LaraTwitterCard::setTitle('Foo');
LaraTwitterCard::setDescription('Foo bar');
LaraTwitterCard::setCard('summary');
LaraTwitterCard::setSite('@'.env('APP_NAME'));
LaraTwitterCard::setCreator('@'.env('APP_NAME'));
LaraTwitterCard::setImage('https://d1s5saizp11buw.cloudfront.net/airy-web/images/seo-landing-banner.jpg');

In your View

{!! LaraSeo::generate() !!}
{!! LaraOpenGraph::generate() !!}
{!! LaraTwitterCard::generate() !!}

About

Simple Laravel SEO Package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages