Admin can now control channel creation from the admin dashboard

This commit is contained in:
2026-05-16 03:43:25 +03:30
parent 34445f3032
commit f46f32aa4c
14 changed files with 639 additions and 95 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
#[Fillable(['channel_creation_open'])]
class PlatformSetting extends Model
{
protected $attributes = [
'channel_creation_open' => false,
];
public static function current(): self
{
return static::query()->first() ?? static::query()->create();
}
protected function casts(): array
{
return [
'channel_creation_open' => 'boolean',
];
}
}