A simple package for building and displaying page titles.
129,177
7
0
Package Data
Maintainer Username: craigsansam
Maintainer Contact: craig@radiula.com (Craig Sansam)
Package Create Date: 2014-03-01
Package Last Update: 2020-09-30
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-11-19 03:17:02
Package Statistics
Total Downloads: 129,177
Monthly Downloads: 2,556
Daily Downloads: 57
Total Stars: 7
Total Watchers: 0
Total Forks: 2
Total Open Issues: 0

Radiula Title

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

Install

Pull this package in through Composer.

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

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');

Getting all segments

Title::segments();

Overriding all segments

Title::setSegments(['Foo', 'Bar']);

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