PHP code example of dkrasov / seo-manager

1. Go to this page and download the library: Download dkrasov/seo-manager 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/ */

    

dkrasov / seo-manager example snippets


return [
    /**
     * Database table name where your manager data will be stored
     */
    'database' => [
            'table' => 'seo_manager',
            'locales_table' => 'seo_manager_locales',
            'translates_table' => 'seo_manager_translates'
        ],
        
    /**
     * Set default locale,
     * It will be added as default locale
     * when locales table migrated
     */
    'locale' => 'en',

    /**
     * Path where your eloquent models are
     */
    'models_path' => '',

    /**
     * Route from which your Dashboard will be available
     */
    'route' => 'seo-manager',

    /**
     * Middleware array for dashboard
     * to prevent unauthorized users visit the manager
     */
    'middleware' => [
        //  'auth',
    ],

    /**
     * Routes which shouldn't be imported to seo manager
     */
    'except_routes' => [
        'seo-manager',
        'admin'
        //
    ],

    /**
     * Columns which shouldn't be used ( in mapping )
     */
    'except_columns' => [
        // "created_at",
        // "updated_at",
    ],

    /**
     * Set this parameter to true
     * if you want to have "$metaData" variable
     * shared between all views in "web" middleware group
     */
    'shared_meta_data' => false
];

use Krasov\SeoManager\Facades\SeoManager;

array:13 [▼
  "keywords" => "First Keyword, Second, Third"
  "description" => "Test Description"
  "title" => "Test Titile"
  "url" => "http://example.com/users/1"
  "author" => "Sergey Karakhanyan"
  "title_dynamic" => "Test Titile - Custom Text - Test User Name "
  "og:url" => "http://example.com/users/1"
  "og:type" => "website"
  "og:image:url" => "https://wallpaperbrowse.com/media/images/3848765-wallpaper-images-download.jpg"
  "og:title" => "Test Titile - Custom Open Graph Text"
  "og:locale" => "en_GB"
  "og:site_name" => "Seo Manager Package"
  "og:description" => "Open Graph Description"
]

SeoManager::metaData('og_data');

array:7 [▼
  "og:url" => "http://example.com/users/1"
  "og:type" => "website"
  "og:image:url" => "https://wallpaperbrowse.com/media/images/3848765-wallpaper-images-download.jpg"
  "og:title" => "Test Titile - Custom Open Graph Text"
  "og:locale" => "en_GB"
  "og:site_name" => "Seo Manager Package"
  "og:description" => "Open Graph Description"
]
bash
php artisan vendor:publish --provider="Krasov\SeoManager\SeoManagerServiceProvider" --tag=config --force
bash
php artisan vendor:publish --provider="Krasov\SeoManager\SeoManagerServiceProvider" --tag=assets --force
bash
php artisan migrate
bash
php artisan vendor:publish --provider="Krasov\SeoManager\SeoManagerServiceProvider"