radiula/title

A simple package for building and displaying page titles.

Installs: 1 314

Dependents: 0

Stars: 2

Watchers: 1

Forks: 1

Language: PHP

0.4.4 2015-06-26 11:04 UTC

README

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

Install

Pull this package in through Composer.

{
    "require": {
    "radiula/title": "~0.4"
}

Add the following to you config/app.php

'providers' => [
    '...',
    'Radiula\Title\TitleServiceProvider'
];

'aliases' => [
    '...',
    'Title' => 'Radiula\Title\Facades\Title',
];

Usage

Set the site title
Title::siteName('Acme Site');
Set one or more segments
Title::segment('Foo', 'Bar');
Make the title
Title::make();
Overriding the layout
Title::layout('%s - %s');
Return Last Segment
Title::last();   

Running the siteName and segment methods with the above properties (and the default layout), would cause make to output the following

Foo | Bar | Acme Site