PHP code example of despark / igni-seo

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

    

despark / igni-seo example snippets


   ...
    /*
    * igniCMS Service Providers
    */
    Despark\Cms\Seo\Providers\IgniSeoServiceProvider::class,
    /*
    * Package Service Providers...
    */
    Laravel\Tinker\TinkerServiceProvider::class,
   ...
  
 artisan vendor:publish --provider="Despark\Cms\Seo\Providers\IgniSeoServiceProvider"
 artisan migrate

   'content' => [
      'type' => 'wysiwyg',
      'label' => 'Content',
    ],
    'readability' => [
      'type' => 'readability',
      'for' => 'content', // This field is optional. Use it only if your column, that is going to be checked for readability, is not called content
      'editorPosition' => 0, // The position of the desired editor, if you have more than one wysiwygs
     ],
    'seo' => [
      'type' => 'seo',
      'routeName' => 'articles.show',
      'meta_title_field' => 'title', // This field is optional. Use it only if your column, which is going to be checked is not called title
     ],

use Despark\Cms\Admin\Interfaces\UploadImageInterface;
use Despark\Cms\Admin\Traits\AdminImage;
use Despark\Cms\Models\AdminModel;
use Despark\Cms\Seo\Contracts\Seoable;
use Despark\Cms\Seo\Traits\HasSeo;

class Article extends AdminModel implements Seoable, UploadImageInterface
{
    use HasSeo;
    use AdminImage;

    protected $table = 'articles';

    protected $fillable = [
        'title',
        'slug',
        'content',
    ];

    protected $rules = [
        'title' => '

  $seoData = $model->seo;