dipu
In temporary url s3 png image it show black background i want to change it to white
''' ->modalContent(function () {
return Str::viewFromString('<div style="text-align:center;"><img src="{{ $img_url }}" alt="{{ $img_alt }}" style="display: inline-block; margin: auto; padding: 5px; border: 1px solid #CCC;" /></div>', [
"img_url" => Storage::temporaryUrl($this->record->getFirstMediaPath('passport_photo', 'large-preview'), now()->addMinutes(5)),
"img_alt" => $this->record->full_name,
]);
})'''
due to 'large-preview' it show black background i want white background
3 replies
I want to upload file in 2 collection using SpatieMediaLibraryFileUpload
i want store sane upload file in 2 collection Here is my code
public function registerMediaConversions(Media $media = null): void
{
// dd($media);
$this
->addMediaConversion('preview')
->performOnCollections('employee_photo')
->fit(Fit::Contain, 300, 300)
->nonQueued();
$this
->addMediaConversion('large-preview')
->performOnCollections('passport_photo')
->fit(Fit::Contain, 475, 600)
->nonQueued();
$this
->addMediaConversion('thumb')
->performOnCollections('passport_photo')
->fit(Fit::Contain, 150, 200)
->nonQueued();
}
i want store both employee_photo and passport_photo
3 replies
i want to search case-sensitivity column search
TextColumn::make('contact.firstName')->searchable()->weight('bold')->grow(false),
this line show error is
'''Illuminate \ Database \ QueryException PHP 8.1.2-1ubuntu2.14 10.33.0 SQLSTATE[42703]: Undefined column: 7 ERROR: column "firstname" does not exist LINE 1: ...ontactId" = "contacts"."mfm_contact_id" and lower(firstName:... ^ HINT: Perhaps you meant to reference the column "contacts.firstName". SELECT count(*) AS aggregate FROM "conversations" WHERE ( EXISTS ( SELECT * FROM "contacts" WHERE "conversations"."contactId" = "contacts"."mfm_contact_id" AND lower(firstName:: text):: text LIKE % sa % AND "contacts"."deleted_at" IS NULL ) )''' query autometically lower table column name
'''Illuminate \ Database \ QueryException PHP 8.1.2-1ubuntu2.14 10.33.0 SQLSTATE[42703]: Undefined column: 7 ERROR: column "firstname" does not exist LINE 1: ...ontactId" = "contacts"."mfm_contact_id" and lower(firstName:... ^ HINT: Perhaps you meant to reference the column "contacts.firstName". SELECT count(*) AS aggregate FROM "conversations" WHERE ( EXISTS ( SELECT * FROM "contacts" WHERE "conversations"."contactId" = "contacts"."mfm_contact_id" AND lower(firstName:: text):: text LIKE % sa % AND "contacts"."deleted_at" IS NULL ) )''' query autometically lower table column name
6 replies
space is remove when i call concat in option
->form([
Select::make('mfm_member_id')
->label('Partner Name')
->options(function () {
return Contact::query()
->selectRaw("CONCAT(name, ' ', phone, ' ', ' ', email) as combined_data")
->addSelect('id')
->paginate(15)
->pluck('combined_data', 'id');
})
this is my code i want to add space but in option it does not show spaces
2 replies
Can we create edit page of resources in a widgets
i wan to create a widgets for a edit resource page in form format but it is not show the form in view
code is
<?php
namespace App\Filament\Resources\CoachingResource\Widgets;
use App\Filament\Resources\CoachingResource;
use Filament\Forms\Components\Section;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Widgets\Widget;
use Illuminate\Database\Eloquent\Model;
class CoachingEditForm extends Widget
{
protected static string $view = 'filament.resources.coaching-resource.widgets.coaching-edit-form';
public ?Model $record = null;
protected $form;
protected static string $resource = CoachingResource::class;
protected function getForms() : array
{
$this->form = $this->makeForm()
->context('edit')
->model($this->getRecord());
return [
'form' => $this->form
->schema([
TextInput::make('partnership_name')
->maxLength(255),
Select::make('service_id')
->relationship('services', 'service_name')->label('Partnership Level')->placeholder('Partnership Level'),
Select::make('coach_id')
->relationship('users', 'name')->disabled(),
Select::make('status')
->options(['Paid' => 'Paid', 'Partial Paid' => 'Partial Paid', 'Unpaid' => 'Unpaid', 'Overdue' => 'Overdue', 'Expired' => 'Expired'])->label('Status')->disabled(),
])->extraAttributes([
"class" => "primary-contact-details"
])
->columns(4),
Section::make('Partership Details')
->schema([
Select::make('mfm_contact_id')
->relationship('contacts', 'name')
->multiple()
->columns(2),
2 replies
Event extends to liveware component
This is my event code
class InboundMessageProcessed extends Component
{
use Dispatchable, SerializesModels; public $processedData; public function __construct($processedData) { Log::info($processedData); $this->emit("messageAdded");
}
My error is "message": "Access level to Illuminate\Queue\SerializesModels::getPropertyValue() must be public (as in class Livewire\Component)", "exception": "Symfony\Component\ErrorHandler\Error\FatalError", "file": "/home/satyajitsahoo/Documents/Live Project/chat/multifamily-mindset-monorepo/vendor/laravel/framework/src/Illuminate/Queue/SerializesModels.php", "line": 104, "trace": [] }
use Dispatchable, SerializesModels; public $processedData; public function __construct($processedData) { Log::info($processedData); $this->emit("messageAdded");
}
My error is "message": "Access level to Illuminate\Queue\SerializesModels::getPropertyValue() must be public (as in class Livewire\Component)", "exception": "Symfony\Component\ErrorHandler\Error\FatalError", "file": "/home/satyajitsahoo/Documents/Live Project/chat/multifamily-mindset-monorepo/vendor/laravel/framework/src/Illuminate/Queue/SerializesModels.php", "line": 104, "trace": [] }
6 replies
i want changes in route
In place of record i want custom attribute in table
public static function getPages(): array
{
return [ 'index' => Pages\ListConversations::route('/'), 'create' => Pages\CreateConversation::route('/create'), 'edit' => Pages\EditConversation::route('/{record}/edit'), 'view' => Pages\ViewConversation::route('/{record}'), ]; }
}
return [ 'index' => Pages\ListConversations::route('/'), 'create' => Pages\CreateConversation::route('/create'), 'edit' => Pages\EditConversation::route('/{record}/edit'), 'view' => Pages\ViewConversation::route('/{record}'), ]; }
}
5 replies
how to add pages and live wire in custom plugin
i am using this github repo-https://github.com/filamentphp/plugin-skeleton
and when i add pages inside sourcer it give error
Class "chats\chats\chats" not found
at vendor/filament/filament/src/PluginServiceProvider.php:81
77▕
78▕ public function packageBooted(): void
79▕ {
80▕ foreach ($this->getPages() as $page) {
➜ 81▕ Livewire::component($page::getName(), $page);
82▕ }
83▕
84▕ foreach ($this->getRelationManagers() as $manager) {
85▕ if ($manager instanceof RelationGroup) {
+8 vendor frames
9 [internal]:0
Illuminate\Foundation\Application::Illuminate\Foundation{closure}()
+5 vendor frames
15 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
and where can i place livewire
of that page
4 replies