Cushty
Cushty
FFilament
Created by Cushty on 11/5/2024 in #❓┊help
Widgets columns not taking effect
I have the column set on the new dashboard page to 3, but nothing I do makes the 3 widgets stay on the same line.
<?php

namespace App\Filament\Pages;

class Dashboard extends \Filament\Pages\Dashboard
{

public function getColumns(): int | string | array
{
return [
'default' => 3,
'xl' => 3,
];
}


}
<?php

namespace App\Filament\Pages;

class Dashboard extends \Filament\Pages\Dashboard
{

public function getColumns(): int | string | array
{
return [
'default' => 3,
'xl' => 3,
];
}


}
<?php

namespace App\Filament\Widgets;

use Filament\Widgets\Widget;

class StripeDirectorySubscription extends Widget
{

protected int | string | array $columnSpan = 1;
protected static string $view = 'filament.widgets.stripe-directory-subscription';
}
<?php

namespace App\Filament\Widgets;

use Filament\Widgets\Widget;

class StripeDirectorySubscription extends Widget
{

protected int | string | array $columnSpan = 1;
protected static string $view = 'filament.widgets.stripe-directory-subscription';
}
Hope you can help.
13 replies
FFilament
Created by Cushty on 9/26/2024 in #❓┊help
inertia component
Hi can you show inertia react components like you can blade views in Filament? Thanks
13 replies
FFilament
Created by Cushty on 9/12/2024 in #❓┊help
notification css flicker
Hi i am using the notifications on the frontend, its working well, but a flicker of broken css happens before the notifications is show. Is there something I can do to mitigate this? Thanks
5 replies
FFilament
Created by Cushty on 9/3/2024 in #❓┊help
Vanilla Spatie roles or filament shield
Hi I am wondering which is better to use vanilla spatie roles and permissions or Filament shield, I am using breeze for my filament login register if that makes any difference to the choice, I just wanted to hear your thoughts, thanks
3 replies
FFilament
Created by Cushty on 8/27/2024 in #❓┊help
Breeze profile & dashboard page in filament
Hi i am using Beeze from my filament login and register and it is working well. The issue is I want to have the default profile page in filament or rebuild it in filament and remove the default breeze dashboard page, is there a best way of doing this? Thanks
2 replies
FFilament
Created by Cushty on 8/25/2024 in #❓┊help
Add view to table page
No description
4 replies
FFilament
Created by Cushty on 8/24/2024 in #❓┊help
Create hasOne in model
Hi i have set a user to haveOne application in the User model, How can i get filament to use the relationship so a user cannot create more than one application? Thanks
7 replies
FFilament
Created by Cushty on 8/24/2024 in #❓┊help
Share a resource with new panel
Hi what is the best way to pull in a specifice resource in my user panel? I have an admin and user panel, the admin uses all resourses as default, but I am not sure how to just grab one resource that has been setup and used in admin panel. i can use this in user panel:
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
but it grabs all resources. Thanks
5 replies
FFilament
Created by Cushty on 8/23/2024 in #❓┊help
Use Breeze login and register pages
Hi is it possible to use Breeze login and register pages instead of Filaments? Thanks
4 replies
FFilament
Created by Cushty on 8/23/2024 in #❓┊help
wizard step sharing from model
Hi I am trying to share the wizard steps from my Model, but it's causing the layout to not be full width and the has skippable steps stops working, Can you shed some light on how to properly setup the wizard to share steps? Thanks
public function form(Form $form): Form
{
return $form->schema([
Wizard::make(Application::formWizard())
]);

}


public function hasSkippableSteps(): bool
{
return true;
}
public function form(Form $form): Form
{
return $form->schema([
Wizard::make(Application::formWizard())
]);

}


public function hasSkippableSteps(): bool
{
return true;
}
public static function formWizard(): array
{
return [
Step::make('Personal Information')
->description('Provide personal details')
->schema([
Select::make('user_id')
->label('User')
->options(User::all()->pluck('name', 'id'))
->required(),
TextInput::make('first_name')
->required(),
TextInput::make('last_name')
->required(),
TextInput::make('public_profile_name')
->required(),
public static function formWizard(): array
{
return [
Step::make('Personal Information')
->description('Provide personal details')
->schema([
Select::make('user_id')
->label('User')
->options(User::all()->pluck('name', 'id'))
->required(),
TextInput::make('first_name')
->required(),
TextInput::make('last_name')
->required(),
TextInput::make('public_profile_name')
->required(),
3 replies
FFilament
Created by Cushty on 8/22/2024 in #❓┊help
wizard step move after 5
Hi is this still the only way to achieve the wizard steps to move after 5 steps? https://discord.com/channels/883083792112300104/1080807837833384017/threads/1250676735759089707 Thanks
6 replies
FFilament
Created by Cushty on 8/21/2024 in #❓┊help
Spatie media digital ocean spaces, folders
No description
20 replies
FFilament
Created by Cushty on 8/20/2024 in #❓┊help
tailwind normal blade views
Hi i have read through some posts here, but just want to ask your opinion 1. When you install laravel it installs Tailwind, so you should be able to use all tailwind classes available in normal blade files that are not connected to Filament (bg colors etc)? 2. If you use a blade view that get's pulled into a filament file can you only use classes that filament uses or you have to make your own theme? Just a bit confused as I am pulling a blade view into a modal in filament on the front-end and only some classes work. Thanks
18 replies
FFilament
Created by Cushty on 8/11/2024 in #❓┊help
Reuse wizard on frontend
Hi I have a wizard on the create resource, but I want to make it available on the front end, is there an easy way to reuse the form on the front end? and not have to rebuild all fields from scratch? Thanks
11 replies
FFilament
Created by Cushty on 8/8/2024 in #❓┊help
Filament custom rules, in rules folder or forms/components.
Hi, I need to reuse some rules in a filament resource and I was wondering if I should put them in the default Laravel rules folder or the app/forms/components folder. Thanks
2 replies
FFilament
Created by Cushty on 8/7/2024 in #❓┊help
Services and filament tables livewire component
Hi I have a service that has a load of options, I've queried the options in a select filter, but I am getting: An attempt was made to evaluate a closure for [Filament\Tables\Filters\SelectFilter], but [$value] was unresolvable. Do I need to do something else as it's a livewire component? I have more price options but hit limit of discord Thanks
<?php

namespace App\Services;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Facades\Log;

class PricingFilterService
{
public static function getOptions(): array
{
return [
'under_40' => 'Under 40',
'40_60' => '40 - 60',
'60_80' => '60 - 80',

];
}

public static function applyQuery(Builder $query, $value, $column): Builder
{
$query->whereNotNull($column);
return match ($value) {
'under_40' => $query->where($column, '<', 40),
'40_60' => $query->whereBetween($column, [40, 60]),
'60_80' => $query->whereBetween($column, [60, 80]),
default => $query,
};
}
}
<?php

namespace App\Services;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Facades\Log;

class PricingFilterService
{
public static function getOptions(): array
{
return [
'under_40' => 'Under 40',
'40_60' => '40 - 60',
'60_80' => '60 - 80',

];
}

public static function applyQuery(Builder $query, $value, $column): Builder
{
$query->whereNotNull($column);
return match ($value) {
'under_40' => $query->where($column, '<', 40),
'40_60' => $query->whereBetween($column, [40, 60]),
'60_80' => $query->whereBetween($column, [60, 80]),
default => $query,
};
}
}
SelectFilter::make('sport_pricing')
->label('Individual pricing')
->options(PricingFilterService::getOptions())
->query(function (Builder $query, $value) {
return PricingFilterService::applyQuery($query, $value, 'sport_pricing');
}),
SelectFilter::make('sport_pricing')
->label('Individual pricing')
->options(PricingFilterService::getOptions())
->query(function (Builder $query, $value) {
return PricingFilterService::applyQuery($query, $value, 'sport_pricing');
}),
2 replies
FFilament
Created by Cushty on 8/6/2024 in #❓┊help
on table builder select parent child
No description
3 replies
FFilament
Created by Cushty on 8/5/2024 in #❓┊help
Still having css issues with Breeze
No description
2 replies
FFilament
Created by Cushty on 8/3/2024 in #❓┊help
filament filters show more
hi, I have a large list of filters in a checkbox list using a table in a livewire component, the filters are currently showing in a modal, but is there a way to show only a few options on each large filter checkbox list and a view more button built into filament, like on Airbnb filters or would I have to make a custom blade view and pull it in? Thanks
https://imgur.com/a/u2suI5n
https://imgur.com/a/u2suI5n
12 replies
FFilament
Created by Cushty on 8/2/2024 in #❓┊help
filament, liveire full page compnent and larave breeze css issue
Hi i have a full page livewire component and all is good except if I add the presets to the main tailwind config, it breaks the breeze dashboard and profile styling, if i remove presets everything works but the filament colours are not showing in the component, i did make a custom theme for the admin panel, but not sure if i need to use that or even how to use it in a full page component. thanks.
27 replies