Kanalaetxebarria
Kanalaetxebarria
FFilament
Created by Kanalaetxebarria on 4/26/2024 in #❓┊help
Remove page title
Hi, I'd like to remove the page title from a custom page in my panel. I found on the docs a way to customise it, but not remove it:
protected static ?string $title = 'Custom Page Title';
protected static ?string $title = 'Custom Page Title';
Does anybody know how to do this? Thanks!
9 replies
FFilament
Created by Kanalaetxebarria on 4/12/2024 in #❓┊help
Tailwind Issues even with Custom Theme
Hi, I'm having some issues with tailwind where certain classes are not being picked up. I've setup a custom theme and followed all the instructions and still can't get it to work right. The issue is only happening on components that are under the /resources/views/filament/... it's also happening in a component that lives in that dir, but includes some livewire components living under /resources/views/livewire/... Here's my main tailwind config:
content: [
"./resources/**/*.blade.php",
"./resources/**/*.js",
"./node_modules/flowbite/**/*.js",
"./app/Filament/**/*.php",
"./resources/views/filament/**/*.blade.php",
"./vendor/filament/**/*.blade.php",
],
content: [
"./resources/**/*.blade.php",
"./resources/**/*.js",
"./node_modules/flowbite/**/*.js",
"./app/Filament/**/*.php",
"./resources/views/filament/**/*.blade.php",
"./vendor/filament/**/*.blade.php",
],
Finally, my theme tailwind config:
content: [
"./app/Filament/Talent/**/*.php",
"./resources/views/filament/**/*.blade.php",
"./vendor/filament/**/*.blade.php",
],
content: [
"./app/Filament/Talent/**/*.php",
"./resources/views/filament/**/*.blade.php",
"./vendor/filament/**/*.blade.php",
],
Am I missing anything? Thanks!
20 replies
FFilament
Created by Kanalaetxebarria on 12/1/2023 in #❓┊help
Dynamically pass properties to @entangle directive
Hi, I know this isn't filament related, but I was wondering if there is a way to dynamically pass my properties to the @entangle directive?

x-data="range(@js($property))"


x-data="range(@js($property))"

minValue: @entangle($property . '.min'),
minValue: @entangle($property . '.min'),
Example properties:
public $height = ['min' => 120,...

public $height = ['min' => 120,...

&
public $waistWidth = ['min' => 60,...
public $waistWidth = ['min' => 60,...
Expected output:
minValue: @entangle('height.min'),
minValue: @entangle('waistWidth.min')
minValue: @entangle('height.min'),
minValue: @entangle('waistWidth.min')
The way I'm doing it now actually echoes out the correct values, but the binding seems to not work very well. Thanks in advanced!
2 replies
FFilament
Created by Kanalaetxebarria on 11/21/2023 in #❓┊help
Live chat functionality
Hi, I need to implement a live chat functionality on my filament app. I've made a Livewire page/component to display the chat tab. The chat should be from user to user, not general (never general). I'm wondering if I should go about implementing this using Pusher & Laravel Echo or if I should just make http based messaging. Have any of you implemented something like this? What would you suggest? The chat should be able to scale to some degree (definitely less than the Pusher free tier though). I suppose this is more of a Laravel question in general, but as a solo dev it's hard to tell the what best approach is at times. Any input is appreciated!
4 replies
FFilament
Created by Kanalaetxebarria on 11/18/2023 in #❓┊help
Trigger delete action on custom layout for table
Hi, I'm trying to render a resource that contains only images as an image gallery. I've made a custom ListRecords view, where I'm displaying the records in my custom layout:
@foreach ($this->table->getRecords() as $key => $record)
{{-- @dd(get_class_methods($record)) --}}
<div class="overflow-hidden aspect-square">
<button type="button" wire:loading.attr="disabled"
wire:click="mountTableAction('delete', {{ $key + 1 }})">Delete</button>
<img src="{{ asset($record->portfolio_image) }}" alt="" class="w-full h-full object-cover">
</div>
@endforeach
@foreach ($this->table->getRecords() as $key => $record)
{{-- @dd(get_class_methods($record)) --}}
<div class="overflow-hidden aspect-square">
<button type="button" wire:loading.attr="disabled"
wire:click="mountTableAction('delete', {{ $key + 1 }})">Delete</button>
<img src="{{ asset($record->portfolio_image) }}" alt="" class="w-full h-full object-cover">
</div>
@endforeach
I'm trying to get the delete action to work. I've copied what I see on the markup from the other resource's delete action button. I see that I'm triggering a request through the network when clicking the delete button on my custom layout, but I don't get any kind of delete confirmation modal and the record doesn't delete. I've tried passing the record id, the key without + 1, read through the vendor files but can't seem to figure it out. How can I delete the records? Thanks!
3 replies
FFilament
Created by Kanalaetxebarria on 11/14/2023 in #❓┊help
Render images in RichTextEditor
Hi, is it possible to output img tags through the RichTextEditor? So adding an image file and have it render as an image in the output? Thanks!
2 replies
FFilament
Created by Kanalaetxebarria on 9/27/2023 in #❓┊help
Ways to manage registration in production
I need to manage registration to the admin panel in production, so that not everybody can go ahead and register. I'm wondering if there's some kind of standard way to handle this? I was thinking something like a secret key -kinda like Laravel's maintenance mode bypass. Any ideas?
7 replies
FFilament
Created by Kanalaetxebarria on 9/27/2023 in #❓┊help
Missing tenant parameter on routes
Hi, I'm trying to setup a profile page that lives within the application layout. In order to do this, I'm extending the EditProfile class, and trying to set the layout as the index, instead of the simple one. However, as soon as I try to do this, I get the error: Missing required parameter for [Route: filament.admin.pages.dashboard] [URI: admin/{tenant}] [Missing parameter: tenant]. Any ideas? I had the same issue when trying to setup the Spotlight package.
28 replies
FFilament
Created by Kanalaetxebarria on 9/13/2023 in #❓┊help
Styling issues in Livewire components
After upgrading to V3, I'm having styling issues in a custom Livewire component that's added into a filament page. I've added the filament preset to my tailwind config, but I still have this issue. Some of the tailwind classes work, and some don't. Can't seem to figure out why, any ideas?
4 replies
FFilament
Created by Kanalaetxebarria on 8/13/2023 in #❓┊help
Update tenants based on Session value
Hi, I'm trying to update my tenants based on a value that's been put on my Session. Here's an example:
public function getTenants(Panel $panel): Collection
{
return Project::where('client_id', Session::get('active-client'))->get();
}
public function getTenants(Panel $panel): Collection
{
return Project::where('client_id', Session::get('active-client'))->get();
}
I'm updating that value based on a select element being handled by Livewire. Short example:
public function change()
{
Session::put('active-client', $this->activeClient);
}
public function change()
{
Session::put('active-client', $this->activeClient);
}
However, I find I can't reactively update the tenant list. Any ideas?
2 replies
FFilament
Created by Kanalaetxebarria on 8/13/2023 in #❓┊help
Active resource
Hi, I'm working on a small project management tool. In this tool, you'll be able to make "Clients" each of which can have multiple "Projects." I've implemented tenancy for the Clients model, enabling the creation of Clients and then Projects within each Client's scope. I'm not sure on how to implement a dynamic tenancy structure, where the active tenant is initially the "Client," and then a specific "Project." The objective is to first select the desired Client, then choosing one of their Projects, and then manage the resources. Could anybody help with some insights as to how to achieve this?
4 replies
FFilament
Created by Kanalaetxebarria on 8/6/2023 in #❓┊help
mutateFormDataUsing not working on CreateAction
Hi, I can't get mutateFormDataUsing to work and mutate my data in a header CreateAction. I saw somebody else had the same issue, but it didn't seem to have been resolved. I've also tried "using", but also not working well. Any tips?
7 replies
FFilament
Created by Kanalaetxebarria on 8/1/2023 in #❓┊help
Adding a render hook to the sidebar V3
Hi, I used to be able to add a select element on my sidebar by registering a render hook on my AppServiceProvider like so:
Filament::registerRenderHook(
'sidebar.start',...
Filament::registerRenderHook(
'sidebar.start',...
but now in V3 I'm not sure how to go about this. Can't seem to find it on the new docs either. Does anybody know how it's done now?
5 replies
FFilament
Created by Kanalaetxebarria on 7/4/2023 in #❓┊help
Get image size from file upload
I need to get the image size from the file upload form component and send that over an api resource. I can't seem to find anything about this in the docs, any ideas?
9 replies
FFilament
Created by Kanalaetxebarria on 7/1/2023 in #❓┊help
Passing data to custom page through table action.
Hi, I'm trying to pass the current record to a custom page on a table action, however I can't seem to get the data. Here's my setup: Layer resource, table actions:
->actions([
Tables\Actions\EditAction::make(),
Tables\Actions\Action::make('draw')
->label('Draw')
->url(fn (Layer $record): string => route('filament.resources.layers.draw', ['record' => $record]))
])
->actions([
Tables\Actions\EditAction::make(),
Tables\Actions\Action::make('draw')
->label('Draw')
->url(fn (Layer $record): string => route('filament.resources.layers.draw', ['record' => $record]))
])
Draw custom page blade view:
<x-filament::page>
<div id="map">
@dd($record)
</div>
</x-filament::page>
<x-filament::page>
<div id="map">
@dd($record)
</div>
</x-filament::page>
Error:
Undefined variable $record
Undefined variable $record
. I can't find much on the docs. Any clues as to what might be going wrong?
14 replies
FFilament
Created by Kanalaetxebarria on 6/24/2023 in #❓┊help
How to enforce policy on list pages
Hi, I noticed that the view() method of the policies doesn't work on the ListPages. What would be a good way to enforce some authorization on the ListPages?
9 replies