ariftography
ariftography
FFilament
Created by ariftography on 8/5/2023 in #❓┊help
How to get selected record from table in header action?
I have found a simple solution for this problem, I use notification for opening bulk action in new tab, this is my code
BulkAction::make('Label Barcode')
->label('Label Barcode')
->action(function ($records) {

$selectedRecordIds = $records->pluck('id')->implode(',');

Notification::make()
->title('Apakah Anda yakin akan mencetak label ini?')
->success()
->persistent()
->actions([
Action::make('ya')
->button()
->url(route('label', $selectedRecordIds), shouldOpenInNewTab: true)
->close(),

])
->send();
}),
BulkAction::make('Label Barcode')
->label('Label Barcode')
->action(function ($records) {

$selectedRecordIds = $records->pluck('id')->implode(',');

Notification::make()
->title('Apakah Anda yakin akan mencetak label ini?')
->success()
->persistent()
->actions([
Action::make('ya')
->button()
->url(route('label', $selectedRecordIds), shouldOpenInNewTab: true)
->close(),

])
->send();
}),
7 replies
FFilament
Created by ariftography on 8/27/2023 in #❓┊help
Can't login with existing user table
No, I didn't make any changes, But, I just solved my problem by updating all existing user's password with new hash value that new user generated, Thanks for your insight for checking the hash value
9 replies
FFilament
Created by ariftography on 8/27/2023 in #❓┊help
Can't login with existing user table
I use the table from my other filament V2 application, I try to login with filament V3, do they both use different password hash?
9 replies
FFilament
Created by ariftography on 8/5/2023 in #❓┊help
How to get selected record from table in header action?
I already use bulkaction, but i can not find how to open it in new tab, i just success to open it in same tab, this is my code now in resource ''' BulkAction::make('Label Barcode') ->label('Label Barcode') ->action(function ($records) { $selectedRecordIds = $records->pluck('id')->toArray(); $route = route('label', ['selected_records' => $selectedRecordIds]); return redirect($route); }) ->deselectRecordsAfterCompletion(), ''' in model ''' public function labelBarcode(Request $request) { $selectedRecordIds = $request->input('selected_records', []); $selectedRecords = AsetGuna::with('NamaAset')->with('lokasi') ->whereIn('id', $selectedRecordIds)->get(); return view('filament.label')->with('selectedRecords', $selectedRecords); } ''' in route ''' Route::get('label', [AsetGuna::class, 'labelbarcode'])->name('label'); ''' have you any experience to open bulkaction in new tab?
7 replies