inluxc
inluxc
FFilament
Created by inluxc on 4/2/2024 in #❓┊help
Multiple Sqlite
Has anyone used Multi-Tenancy with diferent DB Sqlite???
2 replies
FFilament
Created by inluxc on 1/29/2024 in #❓┊help
API Tenancy
Can any help me how to setup the Filament Tenancy in the API's, i have diferent domains for each one of them.
4 replies
FFilament
Created by inluxc on 12/13/2023 in #❓┊help
https://frankenphp.dev/
Ahas anyone used frankenphp to deploy Filamentphp
2 replies
FFilament
Created by inluxc on 12/13/2023 in #❓┊help
Rules in TextInput breaks server.
When i add the following rule to an TextInput and i try to save the form is breaks the server and i need to restart it.
Forms\Components\TextInput::make('slug')
->hint('Translatable')
->hintColor('primary')
->hintIcon('heroicon-m-language')
->disabled()
->rules([
function () {
return function ($value, Closure $fail, $livewire) {
// Check if slug belongs to currrent page
$count = Sitemap::all()
->where('slug', '=', $value)
->where('resource_id', $livewire->record->getAttribute('id'))
->where('resource_type', 'page')
->count();
if ($count > 0) {
return;
}

// Check if slug already exists in another resource
$countExists = Sitemap::all()
->where('slug', '=', $value)
->count();
if ($countExists > 0) {
$fail("The slug already exists in another resource");
}
};
},
])
->maxLength(255),
Forms\Components\TextInput::make('slug')
->hint('Translatable')
->hintColor('primary')
->hintIcon('heroicon-m-language')
->disabled()
->rules([
function () {
return function ($value, Closure $fail, $livewire) {
// Check if slug belongs to currrent page
$count = Sitemap::all()
->where('slug', '=', $value)
->where('resource_id', $livewire->record->getAttribute('id'))
->where('resource_type', 'page')
->count();
if ($count > 0) {
return;
}

// Check if slug already exists in another resource
$countExists = Sitemap::all()
->where('slug', '=', $value)
->count();
if ($countExists > 0) {
$fail("The slug already exists in another resource");
}
};
},
])
->maxLength(255),
Can someone point me out what I am doing wrong?
6 replies