Skip to content

Commit

Permalink
update filamentphp basic
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomlove committed Dec 25, 2024
1 parent 183d362 commit f146a65
Show file tree
Hide file tree
Showing 154 changed files with 847 additions and 672 deletions.
2 changes: 1 addition & 1 deletion app/Filament/PageList.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ protected function getTableRecordUrlUsing(): ?\Closure

protected function getTableFiltersLayout(): ?string
{
return Layout::AboveContent;
return \Filament\Tables\Enums\FiltersLayout::AboveContent;
}
}
2 changes: 1 addition & 1 deletion app/Filament/PageListSingle.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class PageListSingle extends ManageRecords

protected function getTableFiltersLayout(): ?string
{
return Layout::AboveContent;
return \Filament\Tables\Enums\FiltersLayout::AboveContent;
}

protected function getTableRecordActionUsing(): ?Closure
Expand Down
2 changes: 1 addition & 1 deletion app/Filament/Pages/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Dashboard extends \Filament\Pages\Dashboard
{
protected ?string $maxContentWidth = 'full';

protected function getWidgets(): array
public function getWidgets(): array
{
return [
AccountInfo::class,
Expand Down
8 changes: 4 additions & 4 deletions app/Filament/Resources/Oauth/AccessTokenResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
use App\Filament\Resources\Oauth\AccessTokenResource\RelationManagers;
use Laravel\Passport\Token;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
Expand All @@ -17,13 +17,13 @@ class AccessTokenResource extends Resource
{
protected static ?string $model = Token::class;

protected static ?string $navigationIcon = 'heroicon-o-collection';
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';

protected static ?string $navigationGroup = 'Oauth';

protected static ?int $navigationSort = 3;

protected static function getNavigationLabel(): string
public static function getNavigationLabel(): string
{
return __('admin.sidebar.oauth_access_token');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ManageAccessTokens extends PageListSingle
{
protected static string $resource = AccessTokenResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
// Actions\CreateAction::make(),
Expand Down
8 changes: 4 additions & 4 deletions app/Filament/Resources/Oauth/AuthCodeResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
use App\Filament\Resources\Oauth\AuthCodeResource\RelationManagers;
use Laravel\Passport\AuthCode;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
Expand All @@ -17,13 +17,13 @@ class AuthCodeResource extends Resource
{
protected static ?string $model = AuthCode::class;

protected static ?string $navigationIcon = 'heroicon-o-collection';
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';

protected static ?string $navigationGroup = 'Oauth';

protected static ?int $navigationSort = 2;

protected static function getNavigationLabel(): string
public static function getNavigationLabel(): string
{
return __('admin.sidebar.oauth_auth_code');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ManageAuthCodes extends PageListSingle
{
protected static string $resource = AuthCodeResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
// Actions\CreateAction::make(),
Expand Down
8 changes: 4 additions & 4 deletions app/Filament/Resources/Oauth/ClientResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
use App\Filament\Resources\Oauth\ClientResource\RelationManagers;
use App\Models\OauthClient;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
Expand All @@ -21,13 +21,13 @@ class ClientResource extends Resource

protected static ?string $model = OauthClient::class;

protected static ?string $navigationIcon = 'heroicon-o-collection';
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';

protected static ?string $navigationGroup = 'Oauth';

protected static ?int $navigationSort = 1;

protected static function getNavigationLabel(): string
public static function getNavigationLabel(): string
{
return __('admin.sidebar.oauth_client');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ManageClients extends PageListSingle
{
protected static string $resource = ClientResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
Expand Down
8 changes: 4 additions & 4 deletions app/Filament/Resources/Oauth/RefreshTokenResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
use App\Filament\Resources\Oauth\RefreshTokenResource\RelationManagers;
use Laravel\Passport\RefreshToken;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
Expand All @@ -17,13 +17,13 @@ class RefreshTokenResource extends Resource
{
protected static ?string $model = RefreshToken::class;

protected static ?string $navigationIcon = 'heroicon-o-collection';
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';

protected static ?string $navigationGroup = 'Oauth';

protected static ?int $navigationSort = 4;

protected static function getNavigationLabel(): string
public static function getNavigationLabel(): string
{
return __('admin.sidebar.oauth_refresh_token');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ManageRefreshTokens extends PageListSingle
{
protected static string $resource = RefreshTokenResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
// Actions\CreateAction::make(),
Expand Down
4 changes: 2 additions & 2 deletions app/Filament/Resources/Section/AudioCodecResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
use App\Filament\Resources\Section\AudioCodecResource\RelationManagers;
use App\Models\AudioCodec;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class EditAudioCodec extends EditCodec
{
protected static string $resource = AudioCodecResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\DeleteAction::make(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ListAudioCodecs extends PageList
{
protected static string $resource = AudioCodecResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
Expand Down
8 changes: 4 additions & 4 deletions app/Filament/Resources/Section/CategoryResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
use App\Repositories\SearchBoxRepository;
use Filament\Facades\Filament;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
Expand All @@ -24,13 +24,13 @@ class CategoryResource extends Resource
{
protected static ?string $model = Category::class;

protected static ?string $navigationIcon = 'heroicon-o-collection';
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';

protected static ?string $navigationGroup = 'Section';

protected static ?int $navigationSort = 2;

protected static function getNavigationLabel(): string
public static function getNavigationLabel(): string
{
return __('admin.sidebar.category');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class EditCategory extends EditRecord

protected static string $resource = CategoryResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\DeleteAction::make(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ListCategories extends PageList
{
protected static string $resource = CategoryResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
Expand Down
4 changes: 2 additions & 2 deletions app/Filament/Resources/Section/CodecResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
use App\Models\Icon;
use App\Models\SearchBox;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class EditCodec extends EditRecord

protected static string $resource = CodecResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\DeleteAction::make(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ListCodecs extends PageList
{
protected static string $resource = CodecResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
Expand Down
6 changes: 3 additions & 3 deletions app/Filament/Resources/Section/IconResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
use App\Filament\Resources\Section\IconResource\RelationManagers;
use App\Models\Icon;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
Expand All @@ -27,7 +27,7 @@ class IconResource extends Resource

protected static ?int $navigationSort = 10;

protected static function getNavigationLabel(): string
public static function getNavigationLabel(): string
{
return __('admin.sidebar.icon');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class EditIcon extends EditRecord

protected static string $view = 'filament.resources.system.category-icon-resource.pages.edit-record';

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\DeleteAction::make(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ListIcons extends PageList
{
protected static string $resource = IconResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
Expand Down
4 changes: 2 additions & 2 deletions app/Filament/Resources/Section/MediaResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
use App\Filament\Resources\Section\MediaResource\RelationManagers;
use App\Models\Media;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class EditMedia extends EditCodec
{
protected static string $resource = MediaResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\DeleteAction::make(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ListMedia extends PageList
{
protected static string $resource = MediaResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
Expand Down
4 changes: 2 additions & 2 deletions app/Filament/Resources/Section/ProcessingResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
use App\Filament\Resources\Section\ProcessingResource\RelationManagers;
use App\Models\Processing;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class EditProcessing extends EditCodec
{
protected static string $resource = ProcessingResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\DeleteAction::make(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ListProcessings extends PageList
{
protected static string $resource = ProcessingResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
Expand Down
Loading

0 comments on commit f146a65

Please sign in to comment.