2017 © Pedro Peláez
 

library page-title

Your package description here.

image

sukohi/page-title

Your package description here.

  • Tuesday, April 19, 2016
  • by Sukohi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

PageTitle

A Laravel package to manage page title based on route name.
(This is for Laravel 5+. For Laravel 4.2), (*1)

Installation

Execute composer command., (*2)

composer require sukohi/page-title:2.*

Register the service provider in app.php, (*3)

'providers' => [
    ...Others...,  
    Sukohi\PageTitle\PageTitleServiceProvider::class,
]

Also alias, (*4)

'aliases' => [
    ...Others...,  
    'PageTitle' => Sukohi\PageTitle\Facades\PageTitle::class,
]

And then execute the next command to publish the view, (*5)

php artisan vendor:publish

Preparation

Set configuration values in config/page-title.php., (*6)

e.g), (*7)

return [
    'patterns' => [
        'key.mode' => '{key} - {mode}',
        'mode.key' => '{mode} - {key}',
    ],
    'replacements' => [
        'key' => [
            'item' => 'Item',
            'address' => 'Address',
            'user' => 'User'
        ],
        'mode' => [
            'index' => 'List',
            'create' => 'Insert',
            'edit' => 'Update',
            'show' => 'Confirmation'
        ]
    ]
];

In this case, for instance, if current route is item.index the page title you will get is Item - List., (*8)

Usage

$page_title = PageTitle::get();

You can specify pattern name like this., (*9)

$page_title = PageTitle::get('mode.key');

You also can set specific route name., (*10)

$page_title = PageTitle::get('mode.key', 'address.create');

License

This package is licensed under the MIT License., (*11)

Copyright 2016 Sukohi Kuhoh, (*12)

The Versions

19/04 2016

2.0.x-dev

2.0.9999999.9999999-dev

Your package description here.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

19/04 2016

dev-master

9999999-dev

Your package description here.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

19/04 2016

2.0.3

2.0.3.0

Your package description here.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

19/04 2016

1.0.x-dev

1.0.9999999.9999999-dev

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

19/04 2016

1.0.4

1.0.4.0

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

19/04 2016

1.0.3

1.0.3.0

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

19/04 2016

2.0.1

2.0.1.0

Your package description here.

  Sources   Download

MIT

The Requires

 

by Avatar Sukohi

19/04 2016

2.0.0

2.0.0.0

Your package description here.

  Sources   Download

The Requires

 

by Avatar Sukohi

19/04 2016

1.0.2

1.0.2.0

  Sources   Download

The Requires

 

by Avatar Sukohi

19/04 2016

1.0.1

1.0.1.0

  Sources   Download

The Requires

 

by Avatar Sukohi

19/04 2016

1.0.0

1.0.0.0

  Sources   Download

The Requires

 

by Avatar Sukohi