rayiumir / laravel-metabox
Easy creation of MetaBox for Laravel
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 1
Forks: 0
Language:Blade
Type:package
Requires
- php: ^8.0
- laravel/framework: ^9.0|^10.0|^11.0|^12.0
Requires (Dev)
- orchestra/testbench: ^7.0|^8.0|^9.0|^10.0
- pestphp/pest-plugin-laravel: ^1.4.0|^2.0.0|^3.1.0
README

Documentation
Laravel Metabox
Metabox is a highly useful feature for retrieving or displaying WordPress information. We decided to bring this Metabox functionality to Laravel. With Laravel Metabox, you can define features such as custom fields for posts without the need to create a custom field table in the database.
Installs
Install Package:
composer require rayiumir/laravel-metabox
After Publish Files:
php artisan vendor:publish --provider="Rayiumir\\LaravelMetabox\\ServiceProvider\\MetaboxServiceProvider"
And Migration Database:
php artisan migrate
How to use
Calling HasMetaboxes
in Models Post.php
:
use Rayiumir\LaravelMetabox\Traits\HasMetaboxes; use HasMetaboxes;
To delete post metabox data, place the following function in Post.php
:
protected static function boot(): void { parent::boot(); static::deleting(function ($post) { $post->metaboxes()->delete(); }); }
Task Laravel Metabox
- Text Field
- Upload Field
- Select Field
- Checkbox Field
- Toggle Field
- Radio ‌Button Field
- Tabs Field
- Gallery Image Field