raheel3031
raheel3031
FFilament
Created by raheel3031 on 3/31/2025 in #❓┊help
Css styling in theme not working
I have installed laravel 12 with latest filament. I have installed a custom theme. I am trying to apply tailwind css but it is not working. When I run npm run build it says that tailwind v4 is installed but filament uses v3. What is the issue?
7 replies
FFilament
Created by raheel3031 on 3/29/2025 in #❓┊help
error installing filament
i have installed laravel 12 but then when i try to execute this
php artisan filament:install --panels
php artisan filament:install --panels
then the adminPanelProvider has been installed. After that when i try this
php artisan make:filament-user
php artisan make:filament-user
i get this error
Filament has not been installed yet: php artisan filament:install --panels
Filament has not been installed yet: php artisan filament:install --panels
10 replies
FFilament
Created by raheel3031 on 3/17/2025 in #❓┊help
filament plugin menu-builder hide from sidebar
i want to hide this filament plugin menu-builder from sidebar. this method doesnt work shouldRegisterNavigation(false)
15 replies
FFilament
Created by raheel3031 on 3/16/2025 in #❓┊help
Layout fields in modal importer
How can divide the import fields in 2 columns in the modal? I cannot find it in the documentation?
3 replies
FFilament
Created by raheel3031 on 3/9/2025 in #❓┊help
validation in importer
Why do i keep getting this error? "The name field is required."
ImportColumn::make('name')
->requiredMapping()
->rules(['required', 'string', 'max:255']),
ImportColumn::make('name')
->requiredMapping()
->rules(['required', 'string', 'max:255']),
public function resolveRecord(): ?Collection
{
try {
// Find or create collection based on ID
$collection = Collection::firstOrNew([
'id' => $this->data['id']
]);

// Set additional fields
$collection->name = $this->data['name'];
$collection->slug = $this->data['slug'] ?? null;
$collection->description = $this->data['description'] ?? null;
$collection->images = $this->data['images'] ?? ['/images/default_image.png'];
$collection->media_id = $this->data['media_id'] ?? null;
$collection->parent_id = $this->data['parent_id'] ?? null;
$collection->is_visible = $this->data['is_visible'] ?? true;
$collection->tags = $this->data['tags'] ?? null;
$collection->data = $this->data['data'] ?? null;

return $collection;
} catch (\Exception $e) {
Log::error('Collection import error', [
'data' => $this->data,
'error' => $e->getMessage()
]);
return null;
}
}
public function resolveRecord(): ?Collection
{
try {
// Find or create collection based on ID
$collection = Collection::firstOrNew([
'id' => $this->data['id']
]);

// Set additional fields
$collection->name = $this->data['name'];
$collection->slug = $this->data['slug'] ?? null;
$collection->description = $this->data['description'] ?? null;
$collection->images = $this->data['images'] ?? ['/images/default_image.png'];
$collection->media_id = $this->data['media_id'] ?? null;
$collection->parent_id = $this->data['parent_id'] ?? null;
$collection->is_visible = $this->data['is_visible'] ?? true;
$collection->tags = $this->data['tags'] ?? null;
$collection->data = $this->data['data'] ?? null;

return $collection;
} catch (\Exception $e) {
Log::error('Collection import error', [
'data' => $this->data,
'error' => $e->getMessage()
]);
return null;
}
}
64 replies
FFilament
Created by raheel3031 on 3/5/2025 in #❓┊help
column data in exporter
this is the code.
ExportColumn::make('data')->label('Data')
->formatStateUsing(function ($state) {
// Debug log the incoming state
\Log::info('Data State:', ['state' => $state, 'type' => gettype($state)]);

if (is_null($state)) {
return json_encode([]);
}

// Keep it simple: just encode the data as JSON
if (is_array($state)) {
return json_encode($state);
}

// If it's already a JSON string, return it
if (is_string($state)) {
// Check if it's valid JSON
json_decode($state);
if (json_last_error() === JSON_ERROR_NONE) {
return $state;
}
}

// For other types, convert to string
return (string)$state;
}),
ExportColumn::make('data')->label('Data')
->formatStateUsing(function ($state) {
// Debug log the incoming state
\Log::info('Data State:', ['state' => $state, 'type' => gettype($state)]);

if (is_null($state)) {
return json_encode([]);
}

// Keep it simple: just encode the data as JSON
if (is_array($state)) {
return json_encode($state);
}

// If it's already a JSON string, return it
if (is_string($state)) {
// Check if it's valid JSON
json_decode($state);
if (json_last_error() === JSON_ERROR_NONE) {
return $state;
}
}

// For other types, convert to string
return (string)$state;
}),
the output should be this
{"featured":true,"priority":1,"weather_resistant":true,"materials":["wood","metal","synthetic"]}
{"featured":true,"priority":1,"weather_resistant":true,"materials":["wood","metal","synthetic"]}
but i am getting only this.
true, 1, true, ["wood","metal","synthetic"]
true, 1, true, ["wood","metal","synthetic"]
i am getting the values and not the key. in the resource it is like this.
Forms\Components\KeyValue::make('data')
->label(__('Additional Details'))
->columnSpanFull(),
Forms\Components\KeyValue::make('data')
->label(__('Additional Details'))
->columnSpanFull(),
4 replies
FFilament
Created by raheel3031 on 2/26/2025 in #❓┊help
how to use formats with importer
is it possible t use xlsx format to import? i don't see this in the documentation.
use App\Filament\Exports\ProductExporter;
use Filament\Actions\Exports\Enums\ExportFormat;

ExportAction::make()
->exporter(ProductExporter::class)
->formats([
ExportFormat::Csv,
])
// or
->formats([
ExportFormat::Xlsx,
])
// or
->formats([
ExportFormat::Xlsx,
ExportFormat::Csv,
])
use App\Filament\Exports\ProductExporter;
use Filament\Actions\Exports\Enums\ExportFormat;

ExportAction::make()
->exporter(ProductExporter::class)
->formats([
ExportFormat::Csv,
])
// or
->formats([
ExportFormat::Xlsx,
])
// or
->formats([
ExportFormat::Xlsx,
ExportFormat::Csv,
])
2 replies
FFilament
Created by raheel3031 on 2/22/2025 in #❓┊help
error but clueless
i am getting this error but i don't know how to debug this
InvalidArgumentException

Unable to locate a class or view for component [input].

at vendor\laravel\framework\src\Illuminate\View\Compilers\ComponentTagCompiler.php:316
312▕ if (Str::startsWith($component, 'mail::')) {
313▕ return $component;
314▕ }
315▕
➜ 316▕ throw new InvalidArgumentException(
317▕ "Unable to locate a class or view for component [{$component}]."
318▕ );
319▕ }
320▕

1 vendor\laravel\framework\src\Illuminate\View\Compilers\ComponentTagCompiler.php:236
Illuminate\View\Compilers\ComponentTagCompiler::componentClass("input")

2 vendor\laravel\framework\src\Illuminate\View\Compilers\ComponentTagCompiler.php:221
Illuminate\View\Compilers\ComponentTagCompiler::componentString("input", ["'Search...'", "'search'", "true", "'o-magnifying-glass'"])
InvalidArgumentException

Unable to locate a class or view for component [input].

at vendor\laravel\framework\src\Illuminate\View\Compilers\ComponentTagCompiler.php:316
312▕ if (Str::startsWith($component, 'mail::')) {
313▕ return $component;
314▕ }
315▕
➜ 316▕ throw new InvalidArgumentException(
317▕ "Unable to locate a class or view for component [{$component}]."
318▕ );
319▕ }
320▕

1 vendor\laravel\framework\src\Illuminate\View\Compilers\ComponentTagCompiler.php:236
Illuminate\View\Compilers\ComponentTagCompiler::componentClass("input")

2 vendor\laravel\framework\src\Illuminate\View\Compilers\ComponentTagCompiler.php:221
Illuminate\View\Compilers\ComponentTagCompiler::componentString("input", ["'Search...'", "'search'", "true", "'o-magnifying-glass'"])
9 replies
FFilament
Created by raheel3031 on 2/10/2025 in #❓┊help
fabricator menu item duplicate
No description
15 replies
FFilament
Created by raheel3031 on 1/28/2025 in #❓┊help
displaying address in filament form
Forms\Components\View::make('same_shipping_notice')
->content(fn (Forms\Get $get) => '
<div class="space-y-1">
<strong>Same as shipping address:</strong>
<div>' . e($get('shipping_address')) . '</div>
<div>' . e($get('shipping_postal_code')) . ' ' . e($get('shipping_city')) . '</div>
<div>' . e($get('shipping_country')) . '</div>
</div>
')
->visible(fn (Forms\Get $get) => $get('use_shipping_address'))
->columnSpanFull(),
Forms\Components\View::make('same_shipping_notice')
->content(fn (Forms\Get $get) => '
<div class="space-y-1">
<strong>Same as shipping address:</strong>
<div>' . e($get('shipping_address')) . '</div>
<div>' . e($get('shipping_postal_code')) . ' ' . e($get('shipping_city')) . '</div>
<div>' . e($get('shipping_country')) . '</div>
</div>
')
->visible(fn (Forms\Get $get) => $get('use_shipping_address'))
->columnSpanFull(),
why is this not working
7 replies
FFilament
Created by raheel3031 on 1/12/2025 in #❓┊help
stripe integration on checkoutpage
i am getting this message when i create a createSetupIntent Undefined method 'createSetupIntent'
public function render()
{
$cart_items = CartManagement::getCartItemsFromCookie();
$grand_total = CartManagement::calculateGrandTotal($cart_items);

// Ensure the user is authenticated and has a Stripe ID
if (auth('customer')->check()) {
$user = auth('customer')->user();
$intent = $user->createSetupIntent(); // Calling the createSetupIntent() method here
}

return view('livewire.pages.checkout-page', compact('cart_items', 'grand_total', 'intent'));
}
public function render()
{
$cart_items = CartManagement::getCartItemsFromCookie();
$grand_total = CartManagement::calculateGrandTotal($cart_items);

// Ensure the user is authenticated and has a Stripe ID
if (auth('customer')->check()) {
$user = auth('customer')->user();
$intent = $user->createSetupIntent(); // Calling the createSetupIntent() method here
}

return view('livewire.pages.checkout-page', compact('cart_items', 'grand_total', 'intent'));
}
i have added the billable trait in the customer model. i have installed cashier but i keep getting this error.
6 replies
FFilament
Created by raheel3031 on 1/8/2025 in #❓┊help
tiptapeditor
i am using tiptapeditor but when i submit something then it doesn't get stored in the database. this is in the resource
TiptapEditor::make('description')
->output(TiptapOutput::Json)
->columnSpanFull(),
TiptapEditor::make('description')
->output(TiptapOutput::Json)
->columnSpanFull(),
6 replies
FFilament
Created by raheel3031 on 1/2/2025 in #❓┊help
Filament stripe
I have a question. In the front-end of my project I want to integrate stripe elements through Javascript. I have a form with livewire and want to integrate stripe elements. In the checkout model i have functions for the customer data collection and a order is being created. How can i execute the collection of customer data, the order creation and the payment which is triggered by Javascript with 1 button? Sorry if the question is unclear. The data is too big to share here.
4 replies
FFilament
Created by raheel3031 on 12/28/2024 in #❓┊help
Undefined array key 1
i am getting this error when trying to clear config, route etc. i don't know how to solve it. Anyone got any ideas?
Undefined array key 1

at vendor\z3d0x\filament-fabricator\src\Services\PageRoutesService.php:87
83▕ public function removeUrlsOf(Page $page): void
84▕ {
85▕ // First remove the entries from the (ID -> URI) mapping
86▕ $idToUrlsMapping = $this->getIdToUrisMapping();
➜ 87▕ $urls = $idToUrlsMapping[$page->id];
88▕ $idToUrlsMapping[$page->id] = null;
89▕ unset($idToUrlsMapping[$page->id]);
90▕ $this->replaceIdToUriMapping($idToUrlsMapping);
91▕

1 vendor\z3d0x\filament-fabricator\src\Services\PageRoutesService.php:87
Illuminate\Foundation\Bootstrap\HandleExceptions::Illuminate\Foundation\Bootstrap\{closure}("Undefined array key 1", "C:\xampp\htdocs\nextxlfabricator\vendor\z3d0x\filament-fabricator\src\Services\PageRoutesService.php")

2 vendor\z3d0x\filament-fabricator\src\Commands\ClearRoutesCacheCommand.php:47
Z3d0X\FilamentFabricator\Services\PageRoutesService::removeUrlsOf(Object(Z3d0X\FilamentFabricator\Models\Page))
Undefined array key 1

at vendor\z3d0x\filament-fabricator\src\Services\PageRoutesService.php:87
83▕ public function removeUrlsOf(Page $page): void
84▕ {
85▕ // First remove the entries from the (ID -> URI) mapping
86▕ $idToUrlsMapping = $this->getIdToUrisMapping();
➜ 87▕ $urls = $idToUrlsMapping[$page->id];
88▕ $idToUrlsMapping[$page->id] = null;
89▕ unset($idToUrlsMapping[$page->id]);
90▕ $this->replaceIdToUriMapping($idToUrlsMapping);
91▕

1 vendor\z3d0x\filament-fabricator\src\Services\PageRoutesService.php:87
Illuminate\Foundation\Bootstrap\HandleExceptions::Illuminate\Foundation\Bootstrap\{closure}("Undefined array key 1", "C:\xampp\htdocs\nextxlfabricator\vendor\z3d0x\filament-fabricator\src\Services\PageRoutesService.php")

2 vendor\z3d0x\filament-fabricator\src\Commands\ClearRoutesCacheCommand.php:47
Z3d0X\FilamentFabricator\Services\PageRoutesService::removeUrlsOf(Object(Z3d0X\FilamentFabricator\Models\Page))
22 replies
FFilament
Created by raheel3031 on 11/5/2024 in #❓┊help
fabricator setting homepage
i cannot find in the documentation how to setup different pages. Anyone has experience with this?
5 replies
FFilament
Created by raheel3031 on 10/26/2024 in #❓┊help
path filament plugin in navigation menu
what are the paths of filament plugins? i want to list them in the adminserviceprovider,
17 replies
FFilament
Created by raheel3031 on 10/26/2024 in #❓┊help
tiptapeditor errors
i have installed tiptapeditor but it is causing problems Problem 1 - Root composer.json requires spatie/shiki-php ^1.3.0, found spatie/shiki-php[1.3.0] but the package is fixed to 2.1.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. You can also try re-running composer require with an explicit version constraint, e.g. "composer require z3d0x/filament-fabricator:*" to figure out if any version is installable, or "composer require z3d0x/filament-fabricator:^2.1" if you know which you need. Installation failed, reverting ./composer.json and ./composer.lock to their original content.
3 replies
FFilament
Created by raheel3031 on 10/24/2024 in #❓┊help
curator filament plugin view
No description
86 replies
FFilament
Created by raheel3031 on 10/11/2024 in #❓┊help
laravel breeze logout
I have laravel breeze installed. I created the guard customer. But when I logout as a customer the admin also logs out. How can I prevent this?
9 replies
FFilament
Created by raheel3031 on 9/22/2024 in #❓┊help
filament plugin menu-builder
Has anyone installed this plugin? I have installed it but when I go to the edit page of the menu builder. I get an error that the route (categories.show)is not defined. Anyone has an idea?
18 replies