PHP code example of rayiumir / laravel-metabox

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

    

rayiumir / laravel-metabox example snippets


use Rayiumir\LaravelMetabox\Traits\HasMetaboxes;

use HasMetaboxes;

protected static function boot(): void
{
    parent::boot();

    static::deleting(function ($post) {
        $post->metaboxes()->delete();
    });
}
bash
php artisan vendor:publish --provider="Rayiumir\\LaravelMetabox\\ServiceProvider\\MetaboxServiceProvider"
bash
php artisan migrate