<?php
namespace App\Filament\Dashboard\Pages;
class TargetFinderGenerator extends Page implements HasForms, HasTable
{
use InteractsWithTable, InteractsWithForms;
public $keyword;
public $selected = [];
protected static ?string $navigationIcon = 'heroicon-o-arrow-right-end-on-rectangle';
protected static ?string $navigationGroup = 'Target Finder';
protected static string $view = 'filament.dashboard.pages.target-finder-generator';
public ?array $data = [];
public function form(Form $form): Form
{
return $form
->statePath('data')
->schema([
Grid::make(2)
->schema([
TextInput::make("keyword")
->default(2)
->required(),
])
]);
}
public static function table(Table $table): Table
{
return $table
->columns([
TextColumn::make("name"),
TextColumn::make("email"),
TextColumn::make("body"),
])
->filters([])
->actions([])
->bulkActions([])
->query(TargetFinder::query());
}
public function fetchApiData()
{
$this->selected = [];
(new TargetFinder)->getRows($this->data);
}
}
<?php
namespace App\Filament\Dashboard\Pages;
class TargetFinderGenerator extends Page implements HasForms, HasTable
{
use InteractsWithTable, InteractsWithForms;
public $keyword;
public $selected = [];
protected static ?string $navigationIcon = 'heroicon-o-arrow-right-end-on-rectangle';
protected static ?string $navigationGroup = 'Target Finder';
protected static string $view = 'filament.dashboard.pages.target-finder-generator';
public ?array $data = [];
public function form(Form $form): Form
{
return $form
->statePath('data')
->schema([
Grid::make(2)
->schema([
TextInput::make("keyword")
->default(2)
->required(),
])
]);
}
public static function table(Table $table): Table
{
return $table
->columns([
TextColumn::make("name"),
TextColumn::make("email"),
TextColumn::make("body"),
])
->filters([])
->actions([])
->bulkActions([])
->query(TargetFinder::query());
}
public function fetchApiData()
{
$this->selected = [];
(new TargetFinder)->getRows($this->data);
}
}