PHP code example of areia-lab / laravel-seo-solution

1. Go to this page and download the library: Download areia-lab/laravel-seo-solution 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/ */

    

areia-lab / laravel-seo-solution example snippets


return [
    'route' => [
        'prefix' => env('SEO_PANEL_PREFIX', 'admin/seo'),
        'middleware' => ['web'],
    ],
    'disk' => env('SEO_DISK', 'public'),
    'defaults' => [
        'title_suffix' => '',
    ],
    'cache' => false,

    'panel' => [
        'title_prefix'  => 'Areia Lab SEO'
    ],
];
bash

php artisan vendor:publish --tag=seo-config

php artisan vendor:publish --tag=seo-migrations

php artisan migrate
bash
php artisan vendor:publish --tag=seo-views
blade
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>@yield('title', 'My Website')</title>

  {{-- Inject SEO --}}
  @seoGlobal

  @seoAutoPage

  @isset($pageKey)
      @seoPage($pageKey)
  @endisset

  @isset($seoModel)
      @seoModel($seoModel)
  @endisset

</head>
<body>
  @yield('content')
</body>
</html>
bash
php artisan vendor:publish --tag=seo-views
bash
php artisan db:seed --class="AreiaLab\LaravelSeoSolution\Database\Seeders\SeoMetaSeeder"