PHP code example of gabrieliuga / laravel-nova-field-seo-metabox
1. Go to this page and download the library: Download gabrieliuga/laravel-nova-field-seo-metabox 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/ */
gabrieliuga / laravel-nova-field-seo-metabox example snippets
php
namespace App\Nova
use Giuga\LaravelNovaSeoMetaboxField\SeoMetabox;
class Example extends Resource
{
...
/**
* Get the fields displayed by the resource.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function fields(Request $request)
{
return [
ID::make()->sortable(),
new SeoMetabox('Seo Metabox', $this->model()),
];
}
}