1. Go to this page and download the library: Download alanmburr/pagetitle 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/ */
public function index()
{
\PageTitle::add('Welcome to our Homepage');
return view('hello');
}
public function index()
{
pagetitle('Welcome to our Homepage');
return view('hello');
}
public function index()
{
pagetitle([
'About us',
'Profile'
]);
return view('hello');
}
return [
/*
|--------------------------------------------------------------------------
| Page name
|--------------------------------------------------------------------------
|
| Type your page name for your website.
| This will be used when there are more titles to concatenate with.
|
*/
'page_name' => '',
/*
|--------------------------------------------------------------------------
| Default title when empty
|--------------------------------------------------------------------------
|
| This will be used when therer is no other title.
| Mainly used for the home page of your website.
|
*/
'default_title_when_empty' => '',
/*
|--------------------------------------------------------------------------
| Delimiter
|--------------------------------------------------------------------------
|
| Titles will be concatenated using this delimiter.
|
*/
'delimiter' => ' :: ',
];
public function index()
{
pagetitle('My Blog Post')->setPageName('My Blog')->setDelimeter(' / ');
return view('hello');
}