Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

Astrotomic/opendor.me

79 stars
3 code files
View Astrotomic/opendor.me on GitHub

composer.json

Open in GitHub
{
//
"require": {
"php": "^8.0",
//
"spatie/laravel-enum": "^2.4"
},
//
}

app/Enums/BlockReason.php

Open in GitHub
use Closure;
use Illuminate\Support\Str;
 
final class BlockReason extends Enum
{
protected static function labels(): Closure
{
return fn (string $value): string => Str::of($value)->replace('_', ' ')->title();
}
}

app/Filament/Resources/OrganizationResource.php

Open in GitHub
use App\Enums\BlockReason as BlockReasonEnum;
use Filament\Resources\Forms\Components\Select;
use Filament\Resources\Forms\Components\TextInput;
 
class OrganizationResource extends Resource
{
//
public static function form(Form $form): Form
{
return $form
->schema([
TextInput::make('id')->disabled(),
TextInput::make('name')->disabled(),
TextInput::make('full_name')->disabled(),
TextInput::make('description')->disabled(),
TextInput::make('location')->disabled(),
TextInput::make('twitter')->disabled(),
TextInput::make('website')->disabled(),
Select::make('block_reason')
->options(Arr::prepend(BlockReasonEnum::toArray(), '', null))
->nullable(),
TextInput::make('blocked_at')->disabled(),
]);
}
//
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.