2017 © Pedro Peláez
 

library metadata

A package that simplifies the implementation of common metadata

image

wearejust/metadata

A package that simplifies the implementation of common metadata

  • Friday, February 3, 2017
  • by ceesvanegmond
  • Repository
  • 3 Watchers
  • 1 Stars
  • 5,433 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 2 % Grown

The README.md

Build Status, (*1)

MetaData

This package allow you to simplify the process of adding meta tags to your HTML. It basically allows you to use a simple to use API., (*2)

Installlation

Laravel 5 integration

This package ships with a Laravel 5 Service Provider to simplify the process. Also a ViewComposer is registered automatically so that there always is a variable $metaData in the in the config specified views, (*3)

app.php, (*4)

'providers' => [
    ...
    ...
    Just\MetaData\Laravel\MetaDataServiceProvider::class,
]

'aliases' => [
    ...
    ...
    'MetaData'  => Just\MetaData\Laravel\Facades\MetaData::class,
]

You can publish the (default) config by fire the following command, (*5)

php artisan vendor:publish --provider="Just\MetaData\Laravel\MetaDataServiceProvider"

Example

Route::get('/', function (Just\MetaData\MetaDataWrapper $manager) {
    ...
    $images = [];

    $manager->fromData('Title', 'Desription', $images);
    //OR
    $object = new SometingWithFollowingInterface(MetaDataInterface);
    $manager->fromInterface($object);

    // You may also use the Facade
    $object = MetaData::fromInterface($object);

    return view('welcome');
});

API of the $metaData object in view

    /**
     * @return string
     */
    public function getTitle();

    /**
     * @return string
     */
    public function getDescription();

    /**
     * @return array
     */
    public function getImages();

    /**
     * @return string
     */
    public function getBaseUrl();

    /**
     * @return string
     */
    public function getCurrentUrl();

The Versions

03/02 2017

v2.x-dev

2.9999999.9999999.9999999-dev

A package that simplifies the implementation of common metadata

  Sources   Download

MIT

The Requires

 

The Development Requires

03/02 2017

dev-master

9999999-dev

A package that simplifies the implementation of common metadata

  Sources   Download

MIT

The Requires

 

The Development Requires

03/02 2017

1.1

1.1.0.0

A package that simplifies the implementation of common metadata

  Sources   Download

MIT

The Requires

 

The Development Requires

02/09 2016

1.0.3

1.0.3.0

A package that simplifies the implementation of common metadata

  Sources   Download

MIT

The Requires

 

The Development Requires

07/07 2016

2.0.0

2.0.0.0

A package that simplifies the implementation of common metadata

  Sources   Download

MIT

The Requires

 

The Development Requires

30/05 2016

1.0.2

1.0.2.0

A package that simplifies the implementation of common metadata

  Sources   Download

MIT

The Requires

 

The Development Requires

13/04 2016

1.0.1

1.0.1.0

A package that simplifies the implementation of common metadata

  Sources   Download

MIT

The Requires

 

The Development Requires

12/01 2016

1.0

1.0.0.0

A package that simplifies the implementation of common metadata

  Sources   Download

MIT

The Requires

 

The Development Requires