ahmant
ahmant
FFilament
Created by ahmant on 5/15/2024 in #❓┊help
Collapse list page widgets
Ok then, I will create a custom one, and let you know the results
7 replies
FFilament
Created by ahmant on 5/15/2024 in #❓┊help
Collapse list page widgets
I want to collapse them in group. Can you tell me which view should I update? Or if I need to create a custom widget, can we create a widget that will contains other widgets? I read these pages: - https://filamentphp.com/docs/3.x/panels/resources/widgets#creating-a-resource-widget - https://filamentphp.com/docs/3.x/support/plugins/build-a-panel-plugin#step-4-create-the-widget But I didn't find a way to da that
7 replies
FFilament
Created by ahmant on 5/15/2024 in #❓┊help
Collapse list page widgets
Any one can help?
7 replies
FFilament
Created by Algorithm on 1/17/2024 in #❓┊help
Custom page and spatie translatable
Setting custom page app\Filament\Resources\SettingResource\Pages\Setting.php
7 replies
FFilament
Created by Algorithm on 1/17/2024 in #❓┊help
Custom page and spatie translatable
SettingResource.php
<?php

namespace App\Filament\Resources;

use App\Filament\Resources\SettingResource\Pages;
use App\Models\Setting;
use Filament\Resources\Concerns\Translatable;
use Filament\Forms\Form;
use Filament\Resources\Resource;

class SettingResource extends Resource
{
use Translatable;

protected static ?string $model = Setting::class;

protected static ?string $navigationIcon = 'heroicon-o-cog';

public static $sectionKeySeparator = '--';

public static function form(Form $form): Form
{
return $form->schema([]);
}

public static function getTranslatableAttributes(): array
{
$sectionKeySeparator = static::$sectionKeySeparator;
return [
"general{$sectionKeySeparator}website_name",
];
}

public static function getPages(): array
{
return [
'index' => Pages\Setting::route('/'),
];
}
}
<?php

namespace App\Filament\Resources;

use App\Filament\Resources\SettingResource\Pages;
use App\Models\Setting;
use Filament\Resources\Concerns\Translatable;
use Filament\Forms\Form;
use Filament\Resources\Resource;

class SettingResource extends Resource
{
use Translatable;

protected static ?string $model = Setting::class;

protected static ?string $navigationIcon = 'heroicon-o-cog';

public static $sectionKeySeparator = '--';

public static function form(Form $form): Form
{
return $form->schema([]);
}

public static function getTranslatableAttributes(): array
{
$sectionKeySeparator = static::$sectionKeySeparator;
return [
"general{$sectionKeySeparator}website_name",
];
}

public static function getPages(): array
{
return [
'index' => Pages\Setting::route('/'),
];
}
}
7 replies
FFilament
Created by Algorithm on 1/17/2024 in #❓┊help
Custom page and spatie translatable
Hello all, I am using "Spatie Translatable" on my custom "Setting" page, you can take a look on my code and get some idea on how you can set your own, for your custom page. And I am verry sorry for sending all the code, and not a direct answer 🙈, but I really didn't know to answer it other than that. And if you have any question, I am ready to help. Settings Table Schema

- id
- section
- key
- value

- id
- section
- key
- value
Setting Model

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Spatie\Translatable\HasTranslations;

class Setting extends Model
{
use HasFactory, HasTranslations;

protected $translatable = ['value'];

protected $guarded = [];
}

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Spatie\Translatable\HasTranslations;

class Setting extends Model
{
use HasFactory, HasTranslations;

protected $translatable = ['value'];

protected $guarded = [];
}
7 replies
FFilament
Created by FlorianW on 11/8/2023 in #❓┊help
FileUpload RemoveFile Event/Action
Hello, I think this is similar to this bug https://github.com/filamentphp/filament/issues/9791 as "afterStateUpdated" is called after switching the locale
2 replies
FFilament
Created by ahmant on 11/20/2023 in #❓┊help
FileUpload reset after locale switch
8 replies
FFilament
Created by ahmant on 11/20/2023 in #❓┊help
FileUpload reset after locale switch
Ah ok, I see I will do it
8 replies
FFilament
Created by ahmant on 11/20/2023 in #❓┊help
FileUpload reset after locale switch
No description
8 replies
FFilament
Created by M on 11/19/2023 in #❓┊help
Problem with table filters
Are you sure that it's from the filter? Because the error you shared says that it's from the relation manager "RelationManagers\PetHasMedicineRelationManager"
12 replies
FFilament
Created by buzkall on 10/22/2023 in #❓┊help
Wrong indicator in SelectFilter with multiple and translatable
Try this:
->filters([
SelectFilter::make('majors')->relationship('majors', 'title')
->getOptionLabelFromRecordUsing(fn ($record) => $record->title) // 👈
])
->filters([
SelectFilter::make('majors')->relationship('majors', 'title')
->getOptionLabelFromRecordUsing(fn ($record) => $record->title) // 👈
])
6 replies
FFilament
Created by Gorg on 7/17/2023 in #❓┊help
Settings page with translations
Hello, Did you figure out something?
2 replies
FFilament
Created by buzkall on 10/22/2023 in #❓┊help
Wrong indicator in SelectFilter with multiple and translatable
Same issue here. Did you solve it?
6 replies
FFilament
Created by ahmant on 10/12/2023 in #❓┊help
Video Uploader for Vimeo
I used this package https://github.com/vimeo/laravel And in the code:
FileUpload::make('video')
->saveUploadedFileUsing(static fn (BaseFileUpload $component, TemporaryUploadedFile $file): ?string => Vimeo::upload($file->getRealPath()))
FileUpload::make('video')
->saveUploadedFileUsing(static fn (BaseFileUpload $component, TemporaryUploadedFile $file): ?string => Vimeo::upload($file->getRealPath()))
2 replies