mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-28 06:57:22 +08:00
update filamentphp basic
This commit is contained in:
@@ -7,9 +7,9 @@ use App\Filament\Resources\Torrent\TagResource\RelationManagers;
|
||||
use App\Models\SearchBox;
|
||||
use App\Models\Tag;
|
||||
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;
|
||||
@@ -24,7 +24,7 @@ class TagResource extends Resource
|
||||
|
||||
protected static ?int $navigationSort = 2;
|
||||
|
||||
protected static function getNavigationLabel(): string
|
||||
public static function getNavigationLabel(): string
|
||||
{
|
||||
return __('admin.sidebar.tags_list');
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ class EditTag extends EditRecord
|
||||
{
|
||||
protected static string $resource = TagResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\DeleteAction::make(),
|
||||
|
||||
@@ -13,7 +13,7 @@ class ListTags extends PageList
|
||||
{
|
||||
protected static string $resource = TagResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\CreateAction::make(),
|
||||
|
||||
@@ -6,9 +6,9 @@ use App\Filament\Resources\Torrent\TorrentDenyReasonResource\Pages;
|
||||
use App\Filament\Resources\Torrent\TorrentDenyReasonResource\RelationManagers;
|
||||
use App\Models\TorrentDenyReason;
|
||||
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;
|
||||
@@ -17,13 +17,13 @@ class TorrentDenyReasonResource extends Resource
|
||||
{
|
||||
protected static ?string $model = TorrentDenyReason::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-ban';
|
||||
protected static ?string $navigationIcon = 'heroicon-o-no-symbol';
|
||||
|
||||
protected static ?string $navigationGroup = 'Torrent';
|
||||
|
||||
protected static ?int $navigationSort = 3;
|
||||
|
||||
protected static function getNavigationLabel(): string
|
||||
public static function getNavigationLabel(): string
|
||||
{
|
||||
return __('admin.sidebar.torrent_deny_reason');
|
||||
}
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ class ManageTorrentDenyReasons extends ManageRecords
|
||||
|
||||
protected static string $resource = TorrentDenyReasonResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\CreateAction::make(),
|
||||
|
||||
@@ -7,9 +7,9 @@ use App\Filament\Resources\Torrent\TorrentOperationLogResource\RelationManagers;
|
||||
use App\Models\Torrent;
|
||||
use App\Models\TorrentOperationLog;
|
||||
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;
|
||||
@@ -18,13 +18,13 @@ class TorrentOperationLogResource extends Resource
|
||||
{
|
||||
protected static ?string $model = TorrentOperationLog::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-collection';
|
||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
|
||||
protected static ?string $navigationGroup = 'Torrent';
|
||||
|
||||
protected static ?int $navigationSort = 4;
|
||||
|
||||
protected static function getNavigationLabel(): string
|
||||
public static function getNavigationLabel(): string
|
||||
{
|
||||
return __('admin.sidebar.torrent_operation_log');
|
||||
}
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ class ManageTorrentOperationLogs extends PageListSingle
|
||||
{
|
||||
protected static string $resource = TorrentOperationLogResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
// Actions\CreateAction::make(),
|
||||
|
||||
@@ -17,9 +17,9 @@ use App\Repositories\TorrentRepository;
|
||||
use Filament\Facades\Filament;
|
||||
use Filament\Forms;
|
||||
use Filament\Pages\Actions\Action;
|
||||
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\Model;
|
||||
@@ -37,7 +37,7 @@ class TorrentResource extends Resource
|
||||
|
||||
protected static ?string $model = Torrent::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-collection';
|
||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
|
||||
protected static ?string $navigationGroup = 'Torrent';
|
||||
|
||||
@@ -45,7 +45,7 @@ class TorrentResource extends Resource
|
||||
|
||||
private static ?TorrentRepository $rep;
|
||||
|
||||
protected static function getNavigationLabel(): string
|
||||
public static function getNavigationLabel(): string
|
||||
{
|
||||
return __('admin.sidebar.torrent_list');
|
||||
}
|
||||
@@ -157,7 +157,7 @@ class TorrentResource extends Resource
|
||||
->label(__('label.deadline'))
|
||||
,
|
||||
])
|
||||
->icon('heroicon-o-arrow-circle-up')
|
||||
->icon('heroicon-o-arrow-up-circle')
|
||||
->action(function (Collection $records, array $data) {
|
||||
$idArr = $records->pluck('id')->toArray();
|
||||
try {
|
||||
@@ -189,7 +189,7 @@ class TorrentResource extends Resource
|
||||
->label(__('label.deadline'))
|
||||
,
|
||||
])
|
||||
->icon('heroicon-o-speakerphone')
|
||||
->icon('heroicon-o-megaphone')
|
||||
->action(function (Collection $records, array $data) {
|
||||
$idArr = $records->pluck('id')->toArray();
|
||||
try {
|
||||
|
||||
@@ -10,7 +10,7 @@ class EditTorrent extends EditRecord
|
||||
{
|
||||
protected static string $resource = TorrentResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\DeleteAction::make(),
|
||||
|
||||
@@ -12,7 +12,7 @@ class ListTorrents extends PageList
|
||||
{
|
||||
protected static string $resource = TorrentResource::class;
|
||||
|
||||
protected function getActions(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
// Actions\CreateAction::make(),
|
||||
|
||||
Reference in New Issue
Block a user