aistglobal/seomanager
| Install | |
|---|---|
composer require aistglobal/seomanager |
|
| Latest Version: | v0.0.3 |
| PHP: | ~5.6|~7.0 |
| Laravel: | 5 |
| License: | MIT |
| Last Updated: | May 31, 2018 |
| Links: | GitHub · Packagist |
Manager
Structure
src/
tests/
vendor/
Installation
1 - Dependency
The first step is using composer to install the package and automatically update your composer.json file, you can do this by running:
composer require aistglobal/seomanager
Note: If you are using Laravel 5.5, the steps 2 and 3, for providers and aliases, are unnecessaries. SeoManager supports Laravel new Package Discovery.
2 - Provider
You need to update your application configuration in order to register the package so it can be loaded by Laravel, just update your config/app.php file adding the following code at the end of your 'providers' section:
config/app.php
// file START ommited
'providers' => [
// other providers ommited
Seo\Manager\Providers\ManagerServiceProvider::class,
],
// file END ommited
3 - Facade
Facades are not supported in Lumen.
In order to use the SeoManager facade, you need to register it on the config/app.php file, you can do that the following way:
// file START ommited
'aliases' => [
// other Facades ommited
'SeoManager'=>Seo\Manager\Facades\SeoManager::class,
],
// file END ommited
4 Configuration
Publish config
In your terminal type
php artisan vendor:publish
php artisan migrate
php artisan storage:link
In seo_manager.php configuration file you can determine the properties of the default values and some behaviors.
Meta tags Generator
With SEOMeta you can create meta tags to the head
-
1 add
{!! SEO::generate(true) !!}to sitehead -
2 add
{!! SeoManager::generateManager() !!}to sitebodyyou can be shut seo manager in admin permission
EX
@if(Auth::user->hasRole() == 'admin')
{!! SeoManager::generateManager() !!}
@endif
- 3 usage in controller
use Seo\Manager\Facades\SeoManager;
class HomeController extends Controller
{
public function index(Request $request)
{
SeoManager::seoManager($request,$keywords, $title, $description, $ogType, $image = null, $locale = null, $locales = null, $canonical = null);
return view('home');
}
}
Testing
$ composer test
Security
If you discover any security related issues, please email vahe.saroyan.web@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Related Packages
The most powerful and extendable tools for managing SEO Meta Tags in your Larave...
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v0.0.3 | ~5.6| | ~5.1 | MIT | |
| v0.0.2 | ~5.6| | ~5.1 | MIT | |
| v0.0.1 | ~5.6| | ~5.1 | MIT |