dev-master
9999999-devSEO handler for Laravel 4, with customization of slugs, meta data and more
MIT
The Requires
- php >=5.3.0
- illuminate/support ~4
by Maxime Fabre
Wallogit.com
2017 © Pedro Peláez
SEO handler for Laravel 4, with customization of slugs, meta data and more
A SEO handler for Laravel, to manage localized slugs, meta tags, etc., (*1)
You start by creating the Seonnet table by typing artisan seonnet:table and running artisan migrate. From there a table is created following this schema (here with a few example entries) :, (*2)
| pattern | title | meta | url | lang | | --------- | ------- | ------ | ----- | ------ | | string | string | text (json) | string | string |
You can add entries to this table by using the provided seonnet/admin route (not yet implemented) or via the Seonnet\Route model :, (*3)
Seonnet\Route::insert([
'pattern' => 'agency/*',
'title' => 'Welcome to our agency',
'meta' => array(
'description' => 'Interesting stuff about your agency'
),
'url' => '',
'lang' => 'fr',
]);
To use Sonnet after that you'll need to replace Laravel's Router with Seonnet's by adding this line to your aliases array in config/app.php :, (*4)
'Route' => 'Seonnet\Facades\Route',
The magic will happen when you type this :, (*5)
Route::get('agency', function() {
return View::make('agency');
});
SEO handler for Laravel 4, with customization of slugs, meta data and more
MIT