/* @method Server getRecord() */
class SoftwareServer extends Page implements HasActions, HasTable
{
use InteractsWithRecord, InteractsWithTable;
protected static string $resource = ServerResource::class;
public function mount(int|string $record): void
{
$this->record = $this->resolveRecord($record);
static::authorizeResourceAccess();
}
public function table(Table $table): Table
{
return $table
->query(Software::queryForSoftwares($this->getRecord()))
->columns([
TextColumn::make('name'),
])
->actions([
Tables\Actions\Action::make('test')
->label('Test')
->form([
TextInput::make('name'),
])
->action(fn (array $data) => dd($data)),
])
->paginated(false);
}
}
/* @method Server getRecord() */
class SoftwareServer extends Page implements HasActions, HasTable
{
use InteractsWithRecord, InteractsWithTable;
protected static string $resource = ServerResource::class;
public function mount(int|string $record): void
{
$this->record = $this->resolveRecord($record);
static::authorizeResourceAccess();
}
public function table(Table $table): Table
{
return $table
->query(Software::queryForSoftwares($this->getRecord()))
->columns([
TextColumn::make('name'),
])
->actions([
Tables\Actions\Action::make('test')
->label('Test')
->form([
TextInput::make('name'),
])
->action(fn (array $data) => dd($data)),
])
->paginated(false);
}
}