PHP code example of diego1araujo / titleasy

1. Go to this page and download the library: Download diego1araujo/titleasy library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

diego1araujo / titleasy example snippets


'Diego1araujo\Titleasy\ServiceProvider',

'Title' => 'Diego1araujo\Titleasy\Facade',

put  - add titles. return: void
last - retrieve last title added. return: string
get  - build the title. return: string. there are 3 params:
		- site name
		- delimiter (default: -)
		- reverse mode (default: false)

Title::get('My Website') // Output: My Website

Title::put('Users Page')
Title::get('My Website') // Output: My Website - Users Page

Title::put('Users Page')
Title::get('My Website', '|') // Output: My Website | Users Page

Title::put('Users Page')
Title::get('My Website', '|', TRUE) // Output: Users Page | My Website

Title::put('Users Page')
Title::put('Editing')
// or just:
Title::put('Users Page', 'Editing')

Title::last()


Diego1araujo\Titleasy\Titleasy as Title;

Title::put('Users Page');
echo Title::get('My Website');