Download the PHP package quintype/meta without Composer

On this page you can find all versions of the php package quintype/meta. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package meta

Meta

A package that makes it easy to add meta tags to your views.

This package will work in any PHP application, and Facades and Service Providers are provided to make it easy to integrate with Laravel 4.

Installation

General

Run the following Composer command in your terminal, or simply add 'Quintype/meta': '1.1.*' to your composer.json file:

composer require Quintype/meta:'1.1.*'

Then update Composer from the terminal:

composer update

Laravel Specific

This package also includes Laravel facades and service providers to make integration with Laravel easy.

Once complete, you now have to add the the service provider to the providers array in app/config/app.php:

'Quintype\Meta\MetaServiceProvider'

Finally, add the following entry entry to the aliases array in app/config/app.php:

'Meta' => 'Quintype\Meta\Facades\Meta'

That's it!

Usage

General

To set meta tag values, you will use the set(array()) method on the Meta instance. Just pass this Meta object around to persist the set values.

$meta = new \Quintype\Meta\Meta;

// Example #1 - Basic setting of values
$meta->set(array('title' => 'Page Title', 'description' => 'Page Description', 'keywords' => array('great', 'site')));

// Example #2 - Setting nested values. This will render tags with names like og:title and og:description
$meta->set(array('title' => 'Page Title', 'og' => array('title' => 'OG Title', 'description' => 'OG Description')));

To display your meta tags using the set values, you will use the display(array()) function on your Meta object.:

$meta->display();

// Displaying Example #1 from above
<meta name="title" content="Page Title"/>
<meta name="description" content="Page Description"/>
<meta name="keywords" content="great, site"/>

// Displaying Example #2 from above
<meta name="title" content="Page Title"/>
<meta name="og:title" content="OG Title"/>
<meta name="og:description" content="OG Description"/>

Laravel Specific

To set meta tag values, you will use the Meta::set(array()) function. Any set values will persist through the entire request of the application:

// Example #1 - Basic setting of values
Meta::set(array('title' => 'Page Title', 'description' => 'Page Description', 'keywords' => array('great', 'site')));

// Example #2 - Setting nested values. This will render tags with names like og:title and og:description
Meta::set(array('title' => 'Page Title', 'og' => array('title' => 'OG Title', 'description' => 'OG Description')));

To display your meta tags using the set values, you will use the Meta::display(array()) function. This will normally be done in your layout or in other views:

Meta::display();

// Displaying Example #1 from above
<meta name="title" content="Page Title"/>
<meta name="description" content="Page Description"/>
<meta name="keywords" content="great, site"/>

// Displaying Example #2 from above
<meta name="title" content="Page Title"/>
<meta name="og:title" content="OG Title"/>
<meta name="og:description" content="OG Description"/>

The display function also accepts an array of default values. These will be used when displaying your meta tags if a value is not set already using set().


All versions of meta with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package quintype/meta contains the following files

Loading the files please wait ....