netsells / title
A simple package for building and displaying page titles.
Installs: 5 071
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.6.0
- illuminate/support: ^5.0|^6.0|^7.0|^8.0|^9.0
Requires (Dev)
- mockery/mockery: ~0.9.
- phpunit/phpunit: ~4.0
README
Install
Pull this package in through Composer.
{
"require": {
"netsells/title": "~0.5"
}
Add the following to your 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