for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Uccello\Core\Models;
use Uccello\Core\Database\Eloquent\Model;
class Block extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'blocks';
* The attributes that should be casted to native types.
* @var array
protected $casts = [
'data' => 'object',
];
* The attributes that are mass assignable.
protected $fillable = [
'module_id',
'tab_id',
'label',
'icon',
'description',
'sequence',
'data',
protected function initTablePrefix()
$this->tablePrefix = env('UCCELLO_TABLE_PREFIX', 'uccello_');
}
public function tab()
return $this->belongsTo(Tab::class);
public function fields()
return $this->hasMany(Field::class)->orderBy('sequence');
public function getDescriptionAttribute()
return $this->data->description ?? null;
data
Uccello\Core\Models\Block
Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.
Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.