PHP code example of royalcms / metable
1. Go to this page and download the library: Download royalcms/metable 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/ */
royalcms / metable example snippets
$post = Post::create($this->request->input());
$post->setMeta('color', 'blue');
$post = Post::whereMeta('color', 'blue');
$value = $post->getMeta('color');
namespace App;
use Royalcms\Component\Database\Eloquent\Model;
use Plank\Metable\Metable;
class Post extends Model
{
use Metable;
//...
}