gladjanus43
gladjanus43
FFilament
Created by gladjanus43 on 10/23/2024 in #❓┊help
Issue with relationmanager on complicated relation (bug?)
No description
3 replies
FFilament
Created by gladjanus43 on 9/11/2024 in #❓┊help
BulkAction modal width not changeable
Hi, I have made a bulk action for products inside an order. I want to set the width of the modal but it keeps the small size.
BulkAction::make('addToTransportOrder')
->modalWidth('2xl')
...
BulkAction::make('addToTransportOrder')
->modalWidth('2xl')
...
I also tried with the MaxWidth::enum but no luck. Is there something else I can try? This api does work with regular modal actions...
4 replies
FFilament
Created by gladjanus43 on 8/15/2024 in #❓┊help
Action is not called when first clicked on modal with modalContent()
Hi, I have a weird bug where I need to press twice on an action. The first time it does send a request to the server but it is not executing the action. Then every other click on whatever action does instantly open the action. It seems like the action is not loaded/mounted or something. I have attached a video to explain the problem visually. The modal opened is an action with a modalContent() where the content is a livewire component with a table. Any help would be appriciated!
14 replies
FFilament
Created by gladjanus43 on 7/25/2024 in #❓┊help
Call livewire function in custom form component from alpine and set state for two fields
No description
14 replies
FFilament
Created by gladjanus43 on 7/11/2024 in #❓┊help
Select in custom livewire component with searchable removes wire.model
HI, I have a very weird issue. I have a custom livewire form in a modal. Everything is working really well except when I add the searchable to the select
Select::make('company_id')
->relationship('company', 'name')
->searchable()
->required(),
Select::make('company_id')
->relationship('company', 'name')
->searchable()
->required(),
Which results in html generated like this: <select x-ref="input" class="h-9 w-full rounded-lg border-none bg-transparent !bg-none choices__input" id="data.company_id" hidden="" tabindex="-1" data-choice="active"></select> However when I remove the searchable method it does add the wire.model to the select input. <select class .... wire:model="data.company_id"> When the searchable is removed everything works as you would expect, and loading the value from the database into the form. With the searchable it of course stays empty and gives the error Livewire Entangle Error: Livewire property ['data.company_id'] cannot be found on component: ['app.filament.pages.planning'] Anybody has seen this before? Or is there something i am missing? Help would be appreciated!
12 replies
FFilament
Created by gladjanus43 on 7/4/2024 in #❓┊help
Registering asset in plugin
No description
8 replies
FFilament
Created by gladjanus43 on 6/18/2024 in #❓┊help
ViewField in repeater with record data in livewire component
I have a repeater where I have overwritten the add action with a modal. I want to use the Simple layout of the repeater and use a custom viewField with the data of the records. Does anyone know how to pass the data into the viewField? I only want to nicely show the information in the repeater, no logic is applied to the field so I dont think I need a custom field class Best case I think would be to pass the record to the viewData() property but I cant figure out how to acces the current record of the repeater
5 replies
FFilament
Created by gladjanus43 on 5/28/2024 in #❓┊help
Execute filament commands inside a filament plugin
Hi, I am making a filament plugin which includes resources, models, relationmanagers, etc... Is there a possibility to use the filament commands like make:filament-resource inside the package folder and it creating the files in the correct place? I have a src folder, and currently I am copying everything from the main app to the plugin but this is not a very nice way of working... I allready tried adding a path to the command like /packages/.../.../SomeResource but this still places it in the app folder Thanks!
4 replies
FFilament
Created by gladjanus43 on 5/28/2024 in #❓┊help
HasManyThrough repeater relation
I am having the following problem where I want to show results in a repeater from a hasManyThroug relation Transport Route id Transport Order id transport Route Id ... Transport Stop id transport order id ... I want to retrieve the stops in a repeater so I have a draggable list to let the user sort its desirered order for the stops. The has many through relation works on a relationmanager but not in the repeater because it only accepts HasOneOrMany or BelongsToMany Is there a way arround this to display all stops in the transport route resource?
5 replies
FFilament
Created by gladjanus43 on 5/8/2024 in #❓┊help
Import action multiple models
Hi, I am working with an importer class. My use case is that one csv is converted to multiple models. For example one row contains a card number. I first want to insert the card to retrieve a card_id. I have the following models which need to be inserted based on this csv: - cards - cars - stations - countries - and the main one which are rows, containing foreign keys to all the above. I know I can use the relationship method column but the problem is that for example cars is build up from license_plate. It is only needed in the cars relationship. I am currently trying this approach, but was wondering if I am doing it wrong:
11 replies
FFilament
Created by gladjanus43 on 2/21/2024 in #❓┊help
Password reset for different user model
I have setup a different user model for a separate panel called customer. It all works correct, but I cannot get the passwordReset method to work. This is the new Customer model.
use Filament\Models\Contracts\FilamentUser;
use Filament\Tables\Columns\Layout\Panel;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;

class Customer extends Authenticatable implements FilamentUser
{
use HasApiTokens, HasFactory, Notifiable;

protected $table = 'customers';

/**
* 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',
];

/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
use Filament\Models\Contracts\FilamentUser;
use Filament\Tables\Columns\Layout\Panel;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;

class Customer extends Authenticatable implements FilamentUser
{
use HasApiTokens, HasFactory, Notifiable;

protected $table = 'customers';

/**
* 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',
];

/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
12 replies
FFilament
Created by gladjanus43 on 2/20/2024 in #❓┊help
Checkbox List, select at least one
Hi, I have a checkbox list where at least one checkbox needs to be selected. I thought it would be easy using the required but it is allowing me to save the form without one checkbox selected The checkboxlist is in a custom livewire component
Forms\Components\CheckboxList::make('users')
->bulkToggleable()
->options(User::all()->pluck('name', 'name'))
->hidden(fn() =>...)
->required()
Forms\Components\CheckboxList::make('users')
->bulkToggleable()
->options(User::all()->pluck('name', 'name'))
->hidden(fn() =>...)
->required()
I also tried adding
->rules([function()....])
->rules([function()....])
But I cant get this working either. It never even validates the thing
14 replies
FFilament
Created by gladjanus43 on 2/16/2024 in #❓┊help
Livewire custom actions
Hi, I have a custom page based on the kanban plugin of Mokosh. I am trying to add quick actions to the cards of the kanban board and would like to use the default filament actions. The problem is that I have one action per card working, but when I try to add the second one it does not register the action. I have posted the code for the actions below. Is there some restriction or am I doing something wrong? Help would be appreciated!
<div class="hidden group-hover:flex group-hover:w-5 group-hover:h-5 mt-5 cursor-pointer z-10">
{{$this->orderToInvoiceAction}}
</div>
<div
class=" hidden group-hover:flex group-hover:w-5 group-hover:h-5 mt-5 z-10 cursor-pointer
">
{{($this->archiveAction)(['order' => $record->id])}}
</div>
<div class="hidden group-hover:flex group-hover:w-5 group-hover:h-5 mt-5 cursor-pointer z-10">
{{$this->orderToInvoiceAction}}
</div>
<div
class=" hidden group-hover:flex group-hover:w-5 group-hover:h-5 mt-5 z-10 cursor-pointer
">
{{($this->archiveAction)(['order' => $record->id])}}
</div>
5 replies
FFilament
Created by gladjanus43 on 12/27/2023 in #❓┊help
Add requiresConfirmation to custom livewire form when saving
I have a livewire component with a wizard form schema. When saving the form I want to let the user confirm their inputs by using the requiresConfirmation dialog. Is there a way to add it to the save method of the livewire component or directly to the
->submitAction(new HtmlString(Blade::render(<<<BLADE
<x-filament::button
type="submit"
size="md"
>
Opslaan
</x-filament::button>
BLADE
)))
->submitAction(new HtmlString(Blade::render(<<<BLADE
<x-filament::button
type="submit"
size="md"
>
Opslaan
</x-filament::button>
BLADE
)))
Thanks!
2 replies
FFilament
Created by gladjanus43 on 12/18/2023 in #❓┊help
Delete repeater items from UI and database at the same time
No description
4 replies
FFilament
Created by gladjanus43 on 12/15/2023 in #❓┊help
Repeater inside a relationship manager action
No description
16 replies
FFilament
Created by gladjanus43 on 12/8/2023 in #❓┊help
Save form before calling a header action
No description
4 replies
FFilament
Created by gladjanus43 on 9/20/2023 in #❓┊help
Custom card Radio Button form field
No description
4 replies
FFilament
Created by gladjanus43 on 9/18/2023 in #❓┊help
file download for private files
No description
4 replies