You have to add toSEO method to your model and specify your columns.
1namespace App\Models; 2 3use Illuminate\Database\Eloquent\Model; 4use Pharaonic\Laravel\SEO\Contracts\SEOContract; 5 6class Article extends Model implements SEOContract 7{ 8 /** 9 * The attributes that are mass assignable.10 *11 * @var array12 */13 protected $fillable = ['title', 'description', 'keywords'];14 15 /**16 * Get SEO Data17 *18 * @return array19 */20 public function seo(): array 21 {22 return [23 'title' => $this->title,24 'description' => $this->description,25 'keywords' => $this->keywords,26 'twitter' => [27 'card' => 'app'28 ]29 ];30 }31}
Just inject the model SEO in the SEO collector to generate it on the page later.
1$article = Article::first();2seo()->model($article);