@@ -18,7 +18,7 @@ class CreateAdminExtensionsTable extends Migration
$table->string('name', 100)->unique();
$table->string('version', 20)->default('');
$table->tinyInteger('is_enabled')->default(0);
- $table->json('options')->nullable();
+ $table->text('options')->nullable();
$table->timestamps();
$table->engine = 'InnoDB';
@@ -10,6 +10,10 @@ class Extension extends Model
protected $fillable = ['name', 'is_enabled', 'version', 'options'];
+ protected $casts = [
+ 'options' => 'json',
+ ];
+
public function __construct(array $attributes = [])
{
$connection = config('admin.database.connection') ?: config('database.default');