mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
.
This commit is contained in:
+1
-3
@@ -36,7 +36,7 @@ return [
|
||||
*/
|
||||
|
||||
'namespaces' => [
|
||||
'fieldsets' => ['App\\Fieldsets', 'Filament\\Fieldsets'],
|
||||
'fieldsets' => ['App\\Filament\\Fieldsets', 'Filament\\Fieldsets'],
|
||||
],
|
||||
|
||||
/*
|
||||
@@ -49,9 +49,7 @@ return [
|
||||
*/
|
||||
|
||||
'redirects' => [
|
||||
|
||||
'admin' => 'filament.admin.dashboard', // string or named route to redirect users when successfully authenticated.
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|
||||
@@ -4,7 +4,24 @@ namespace Filament\Contracts;
|
||||
|
||||
interface Fieldset
|
||||
{
|
||||
/**
|
||||
* The fieldset title.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function title(): string;
|
||||
|
||||
/**
|
||||
* The fieldset fields.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function fields($model): array;
|
||||
|
||||
/**
|
||||
* The rules to ignore in real time for the fieldset.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function rulesIgnoreRealtime(): array;
|
||||
}
|
||||
@@ -67,7 +67,7 @@ class UserEditFieldset implements Fieldset
|
||||
];
|
||||
}
|
||||
|
||||
public static function rulesIgnoreRealtime()
|
||||
public static function rulesIgnoreRealtime(): array
|
||||
{
|
||||
return ['confirmed'];
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@ namespace Filament\Http\Livewire;
|
||||
use Filament\Support\Livewire\FormComponent;
|
||||
|
||||
class UserEdit extends FormComponent
|
||||
{
|
||||
{
|
||||
public function fields()
|
||||
{
|
||||
return $this->fieldset()::fields($this->model);
|
||||
return $this->getFieldset(__FILE__)::fields($this->model);
|
||||
}
|
||||
|
||||
public function rulesIgnoreRealtime()
|
||||
{
|
||||
return $this->fieldset()::rulesIgnoreRealtime();
|
||||
return $this->getFieldset(__FILE__)::rulesIgnoreRealtime();
|
||||
}
|
||||
|
||||
public function success()
|
||||
@@ -68,9 +68,4 @@ class UserEdit extends FormComponent
|
||||
{
|
||||
return redirect()->route('filament.admin.users.index');
|
||||
}
|
||||
|
||||
protected function fieldset()
|
||||
{
|
||||
return $this->getFieldset(__FILE__);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user