mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-22 07:30:25 +00:00
update
This commit is contained in:
parent
11d32fcefe
commit
35a6305d93
5 changed files with 122 additions and 1 deletions
|
@ -4,7 +4,6 @@ namespace Modules\Docker\App\Models;
|
|||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Docker\Database\factories\DockerTemplateFactory;
|
||||
|
||||
class DockerTemplate extends Model
|
||||
{
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
|
||||
namespace Modules\Docker\Filament\Clusters\Docker\Resources;
|
||||
|
||||
use Modules\Customer\App\Filament\Resources\DockerTemplateResource\Pages;
|
||||
use Modules\Customer\App\Filament\Resources\DockerTemplateResource\RelationManagers;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
use Modules\Docker\App\Models\DockerTemplate;
|
||||
|
||||
class DockerTemplateResource extends Resource
|
||||
{
|
||||
|
||||
protected static ?string $navigationGroup = 'Docker';
|
||||
|
||||
protected static ?string $navigationLabel = 'Templates';
|
||||
|
||||
protected static ?string $slug = 'docker/templates';
|
||||
|
||||
|
||||
protected static ?string $model = DockerTemplate::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
//
|
||||
]);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
//
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => Pages\ListDockerTemplates::route('/'),
|
||||
'create' => Pages\CreateDockerTemplate::route('/create'),
|
||||
'edit' => Pages\EditDockerTemplate::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace Modules\Docker\Filament\Clusters\Docker\Resources\DockerTemplateResource\Pages;
|
||||
|
||||
use Modules\Docker\Filament\Clusters\Docker\Resources\DockerTemplateResource;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
|
||||
class CreateDockerTemplate extends CreateRecord
|
||||
{
|
||||
protected static string $resource = DockerTemplateResource::class;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace Modules\Docker\Filament\Clusters\Docker\Resources\DockerTemplateResource\Pages;
|
||||
|
||||
use Modules\Docker\Filament\Clusters\Docker\Resources\DockerTemplateResource;
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
|
||||
class EditDockerTemplate extends EditRecord
|
||||
{
|
||||
protected static string $resource = DockerTemplateResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\DeleteAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace Modules\Docker\Filament\Clusters\Docker\Resources\DockerTemplateResource\Pages;
|
||||
|
||||
use Filament\Actions;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use Modules\Docker\Filament\Clusters\Docker\Resources\DockerTemplateResource;
|
||||
|
||||
class ListDockerTemplates extends ListRecords
|
||||
{
|
||||
protected static string $resource = DockerTemplateResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Actions\CreateAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue