Jap
Jap
FFilament
Created by Jap on 12/23/2024 in #❓┊help
Reverb in Filament Tables
Got the solution instead of finding the table in the javascript i added listener in ListPage or any livewire component files for example:
class ListTransactions extends ListRecords
{
protected static string $resource = TransactionResource::class;

protected $listeners = [
'echo:channel-name,EventName' => '$refresh',
];
}
class ListTransactions extends ListRecords
{
protected static string $resource = TransactionResource::class;

protected $listeners = [
'echo:channel-name,EventName' => '$refresh',
];
}
Then you can dispatch/broadcast events in actions like:
use App\Events\EventName;
Tables\Actions\RestoreAction::make()
->after(function ($record) {
EventName::dispatch();
}),
use App\Events\EventName;
Tables\Actions\RestoreAction::make()
->after(function ($record) {
EventName::dispatch();
}),
11 replies
FFilament
Created by Jap on 12/23/2024 in #❓┊help
Reverb in Filament Tables
Hmm, i think that will affect all tables in any page? Just want to trigger it on a specific table .
11 replies
FFilament
Created by Jap on 12/23/2024 in #❓┊help
Reverb in Filament Tables
I made reverb running by using this line of code in AppServiceProvider:
use Filament\Support\Assets\Js;
use Filament\Support\Facades\FilamentAsset;
use Illuminate\Support\Facades\Vite;

FilamentAsset::register([
Js::make('reverb', Vite::asset('resources/js/reverb.js'))->module(),
])
use Filament\Support\Assets\Js;
use Filament\Support\Facades\FilamentAsset;
use Illuminate\Support\Facades\Vite;

FilamentAsset::register([
Js::make('reverb', Vite::asset('resources/js/reverb.js'))->module(),
])
At reverb.js the problem was finding the table at echo channel like this:
const table = //find the livewire table
if (table) {
// Trigger the Livewire 'refresh' method
}
const table = //find the livewire table
if (table) {
// Trigger the Livewire 'refresh' method
}
11 replies
FFilament
Created by Jap on 12/23/2024 in #❓┊help
Reverb in Filament Tables
Thanks for that, but at this case i want other users table in that same page is reloaded that's why i am trying to use reverb/websockets.
11 replies
FFilament
Created by Jap on 10/21/2024 in #❓┊help
Filament Form Component, Colors not showing
4 replies
FFilament
Created by Jap on 7/18/2024 in #❓┊help
Table Action Group Cannot click 4th action
I got the problem, my footer was using z-index the reason why it cant be clicked.
6 replies
FFilament
Created by Jap on 7/18/2024 in #❓┊help
Disable table actions while searching
Some of my users are clicking the custom table actions i made while the table is still fetching for results encountering an error of "undefined property" since the data is no longer in the table.
6 replies
FFilament
Created by Jap on 7/18/2024 in #❓┊help
Disable table actions while searching
For example while im typing in the search bar of the table, the table actions will be disabled and enabled once its done searching.
6 replies
FFilament
Created by Jap on 7/10/2024 in #❓┊help
Bar Chart Widget labels not working (showing undefined)
It works fine btw when I change the type to 'pie'.
6 replies
FFilament
Created by Jap on 7/10/2024 in #❓┊help
Bar Chart Widget labels not working (showing undefined)
I just created the example myself, it seems label inside datasets only accepts string.
6 replies
FFilament
Created by Kaaiman on 6/26/2024 in #❓┊help
Doughnut chart lines
In your widget try adding:
protected static ?array $options = [ 'scales' => [ 'y' => [ 'grid' => [ 'display' => false, ], 'ticks' => [ 'display' => false, ], ], 'x' => [ 'grid' => [ 'display' => false, ], 'ticks' => [ 'display' => false, ], ], ], ]; https://filamentphp.com/docs/3.x/widgets/charts#setting-chart-configuration-options
8 replies
FFilament
Created by NolanN on 6/3/2024 in #❓┊help
JS Select is showing "arrowdown" in the search field
Having the same issue anyone have a solution for this ?
4 replies
FFilament
Created by Jap on 5/20/2024 in #❓┊help
Modify Export Action download URL link
Anyone can help me solve this without directly modifying the route in the vendor package?
18 replies
FFilament
Created by Jap on 5/14/2024 in #❓┊help
Login not working (Production)
Thanks the problem was in livewire. I forgot to remove/comment this line of code in my service app provider.
Livewire::setUpdateRoute(function ($handle) {
return Route::post('/custom/livewire/update', $handle);
});

Livewire::setScriptRoute(function ($handle) {
return Route::get('/custom/livewire/livewire.js', $handle);
});
Livewire::setUpdateRoute(function ($handle) {
return Route::post('/custom/livewire/update', $handle);
});

Livewire::setScriptRoute(function ($handle) {
return Route::get('/custom/livewire/livewire.js', $handle);
});
I'm using it to configure livewire's update endpoint if my app is deployed in https://example.com/custom.
15 replies
FFilament
Created by Jap on 5/14/2024 in #❓┊help
Login not working (Production)
I see, i tried only returning true on canAccessPanel same thing happens it just reloads then goes back to login page and no errors in browser console
15 replies
FFilament
Created by Jap on 5/14/2024 in #❓┊help
Login not working (Production)
Still not working this is my current source code for my user model.
<?php

namespace App\Models;

use Filament\Models\Contracts\FilamentUser;
use Filament\Panel;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Spatie\Permission\Traits\HasRoles;

class User extends Authenticatable implements FilamentUser, MustVerifyEmail
{
use HasFactory, Notifiable, HasRoles;

/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
'email',
'password',
];

/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];

/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}

public function canAccessPanel(Panel $panel): bool
{
if (!$this->roles()->exists()) {
return false;
}

return $this->hasVerifiedEmail();
}
}
<?php

namespace App\Models;

use Filament\Models\Contracts\FilamentUser;
use Filament\Panel;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Spatie\Permission\Traits\HasRoles;

class User extends Authenticatable implements FilamentUser, MustVerifyEmail
{
use HasFactory, Notifiable, HasRoles;

/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
'email',
'password',
];

/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];

/**
* Get the attributes that should be cast.
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}

public function canAccessPanel(Panel $panel): bool
{
if (!$this->roles()->exists()) {
return false;
}

return $this->hasVerifiedEmail();
}
}
15 replies
FFilament
Created by Jap on 5/14/2024 in #❓┊help
Login not working (Production)
thank you ill try this
15 replies
FFilament
Created by Jap on 5/14/2024 in #❓┊help
Login not working (Production)
public function canAccessPanel(Panel $panel): bool { if ($this->roles->count() == 0) { return false; } return $this->hasVerifiedEmail(); }
15 replies
FFilament
Created by Jap on 5/14/2024 in #❓┊help
Login not working (Production)
Yes i already did and also im using filament shield
15 replies
FFilament
Created by Jap on 3/23/2024 in #❓┊help
Import action download example button missing (BUG)
I just tried using ->modalSubHeading() it still overwrites the download button
7 replies