waleedGRT
waleedGRT
FFilament
Created by waleedGRT on 12/25/2023 in #❓┊help
Call action method from livewire
Can an action method be invoked in Livewire? I attempted to call an action method within the mount and rendered methods of Livewire, but it doesn't seem to be working.
public function rendered()
{

$this->register();
}

public function register(): Action
{
return Action::make('register')
->form([

...

])
->closeModalByClickingAway(false)
->modalCloseButton(false)
->action(

);
}
public function rendered()
{

$this->register();
}

public function register(): Action
{
return Action::make('register')
->form([

...

])
->closeModalByClickingAway(false)
->modalCloseButton(false)
->action(

);
}
5 replies
FFilament
Created by waleedGRT on 12/2/2023 in #❓┊help
Is it possible configure repeater client base?
No description
4 replies
FFilament
Created by waleedGRT on 11/20/2023 in #❓┊help
TailwindCSS safelist is not working.
No description
16 replies
FFilament
Created by waleedGRT on 10/24/2023 in #❓┊help
Tabs Blade component content
I'm utilizing the Tabs Blade component within a Livewire component, but the content isn't being displayed. Here's the code, and I'm hoping someone can identify why it's not functioning as expected.
<div>
<x-filament::tabs label="Content tabs" x-data="{ activeTab: 'tab1' }" contained="false">
<x-filament::tabs.item alpine-active="activeTab === 'tab1'" x-on:click="activeTab = 'tab1'" active>
Tab 1
<x-slot name="badge">
5
</x-slot>
<x-slot name="content">
<h1> Content</h1> // THIS NOT WORKING
</x-slot>
</x-filament::tabs.item>
<x-filament::tabs.item alpine-active="activeTab === 'tab2'" x-on:click="activeTab = 'tab2'">
Tab 2
</x-filament::tabs.item>
<x-filament::tabs.item alpine-active="activeTab === 'tab3'" x-on:click="activeTab = 'tab3'">
Tab 2
</x-filament::tabs.item>
</x-filament::tabs>
</div>
<div>
<x-filament::tabs label="Content tabs" x-data="{ activeTab: 'tab1' }" contained="false">
<x-filament::tabs.item alpine-active="activeTab === 'tab1'" x-on:click="activeTab = 'tab1'" active>
Tab 1
<x-slot name="badge">
5
</x-slot>
<x-slot name="content">
<h1> Content</h1> // THIS NOT WORKING
</x-slot>
</x-filament::tabs.item>
<x-filament::tabs.item alpine-active="activeTab === 'tab2'" x-on:click="activeTab = 'tab2'">
Tab 2
</x-filament::tabs.item>
<x-filament::tabs.item alpine-active="activeTab === 'tab3'" x-on:click="activeTab = 'tab3'">
Tab 2
</x-filament::tabs.item>
</x-filament::tabs>
</div>
11 replies
FFilament
Created by waleedGRT on 10/13/2023 in #❓┊help
Validation Error Display Issue in Ban Middleware Implementation
No description
4 replies
FFilament
Created by waleedGRT on 10/1/2023 in #❓┊help
How can we pass a closure in the column method?
No description
10 replies
FFilament
Created by waleedGRT on 9/27/2023 in #❓┊help
Placeholder with repeater
I'd want to display repeater values in layout placeholders. Is there a method to loop through repeaters and display their values in the summary section? (Proper list format) Code
Placeholder::make('Ingredients')
->content(function (Get $get) {
$ingredients = $get('menu_item_ingredients'); // Repeater
})->columnSpanFull()
Placeholder::make('Ingredients')
->content(function (Get $get) {
$ingredients = $get('menu_item_ingredients'); // Repeater
})->columnSpanFull()
14 replies
FFilament
Created by waleedGRT on 9/21/2023 in #❓┊help
Form filter in one line
No description
21 replies
FFilament
Created by waleedGRT on 9/20/2023 in #❓┊help
infolist not woking?
No description
27 replies
FFilament
Created by waleedGRT on 9/16/2023 in #❓┊help
Can we use collection or array in table query?
I am creating a custom table in Filament, and I want to use a collection of data in the table. However, it seems that the table query in Filament does not support collections. What should I do to work with collections in my custom table? Error Filament\Tables\Table::query(): Argument #1 ($query) must be of type Illuminate\Database\Eloquent\Builder|Closure|null, Illuminate\Support\Collection given, called in /var/www/html/app/Filament/Pages/Reports/AccountStatement.php on line 45 Code
public function table(Table $table): Table
{


$record = Account::where('account_type', Account::BANK)->first();


return $table
->query($record->transactionsQuery(Carbon::yesterday() ,Carbon::tomorrow())->get() )
->columns([
TextColumn::make('name')
])
->filters([
// ...
])
->actions([
// ...
])
->bulkActions([
// ...
]);
}
public function table(Table $table): Table
{


$record = Account::where('account_type', Account::BANK)->first();


return $table
->query($record->transactionsQuery(Carbon::yesterday() ,Carbon::tomorrow())->get() )
->columns([
TextColumn::make('name')
])
->filters([
// ...
])
->actions([
// ...
])
->bulkActions([
// ...
]);
}
Collection Data
Illuminate\Support\Collection {#2175 ▼ // app/Filament/Pages/Reports/AccountStatement.php:43
#items: array:4 [▼
0 => {#2205 ▼
+"id": 1
+"transaction_date": "2023-09-16 10:54:41"
+"transaction_no": "CP01/0001"
+"reference": null
+"transaction_type": "CP"
+"credited": 1
+"narration": "Rent "
+"rate": "1.0000"
}
1 => {#2168 ▼
+"id": 2
+"transaction_date": "2023-09-16 11:55:13"
+"transaction_no": "CP01/0002"
+"reference": null
+"transaction_type": "CP"
+"credited": 1
+"narration": "Consectetur "
+"rate": "1.0000"
}
]
#escapeWhenCastingToString: false
}
Illuminate\Support\Collection {#2175 ▼ // app/Filament/Pages/Reports/AccountStatement.php:43
#items: array:4 [▼
0 => {#2205 ▼
+"id": 1
+"transaction_date": "2023-09-16 10:54:41"
+"transaction_no": "CP01/0001"
+"reference": null
+"transaction_type": "CP"
+"credited": 1
+"narration": "Rent "
+"rate": "1.0000"
}
1 => {#2168 ▼
+"id": 2
+"transaction_date": "2023-09-16 11:55:13"
+"transaction_no": "CP01/0002"
+"reference": null
+"transaction_type": "CP"
+"credited": 1
+"narration": "Consectetur "
+"rate": "1.0000"
}
]
#escapeWhenCastingToString: false
}
15 replies
FFilament
Created by waleedGRT on 9/16/2023 in #❓┊help
helpertext hide after selecting other select field
No description
11 replies
FFilament
Created by waleedGRT on 8/25/2023 in #❓┊help
Disable Sidebar On Custom Page
4 replies
FFilament
Created by waleedGRT on 8/21/2023 in #❓┊help
Some Tailwind CSS classes not working?
Hey everyone, I hope you're all doing well. I'm currently working on a project and I've run into a bit of a roadblock. I'm trying to use the "grid-cols-4" class in my project, but for some reason, it doesn't seem to be working as expected.however "grid-cols-2" and "grid-cols-3" working fine. Here's what I've tried so far: Ensured that I'm using the class correctly in my HTML markup. Checked my Tailwind configuration to make sure the "grid" utility variants are enabled. Verified that I'm running the npm run dev command to update my changes. Inspected the generated CSS in my browser's developer tools to see if the class is being applied. Despite these efforts, the "grid-cols-4" class doesn't seem to take effect. I've included the class in the safelist array in my tailwind.config.js file, so it should not be purged during the build process. If anyone has encountered a similar issue or has expertise with Tailwind CSS, I'd greatly appreciate your input. Please feel free to share any suggestions, insights, or troubleshooting steps that might help me get past this roadblock. Thank you in advance for your help! 🙏
47 replies