Skip to content

Instantly share code, notes, and snippets.

View mohamedsabil83's full-sized avatar
🤝
Ready to help | ❤️ TALL Stack

Mohamed Sabil mohamedsabil83

🤝
Ready to help | ❤️ TALL Stack
View GitHub Profile
@bezhanSalleh
bezhanSalleh / UniqueJsonRule.php
Created February 27, 2022 14:49
A Rule to validate the uniqueness of json translated fields
<?php
namespace App\Rules;
use Illuminate\Support\Facades\DB;
use Illuminate\Contracts\Validation\Rule;
class UniqueJsonRule implements Rule
{
protected ?string $ignoreColumn = null;
@bezhanSalleh
bezhanSalleh / CanMakeSimpleResourcesTranslatable.php
Last active August 16, 2022 18:06
A trait to make Filament Simple Resources(modal) translatable
<?php
namespace App\Filament\Traits;
use Filament\Tables;
use Filament\Pages\Actions\Modal;
use Illuminate\Database\Eloquent\Model;
use Filament\Pages\Actions\ButtonAction;
use Filament\Resources\Pages\Concerns\HasActiveFormLocaleSelect;