namrata
namrata
FFilament
Created by namrata on 12/16/2024 in #❓┊help
Spatie Media Library
OMG !!! IT worked !!!! , thank you so so much !!! You are a geniuessss !!!! Thank you so much
24 replies
FFilament
Created by namrata on 12/16/2024 in #❓┊help
Spatie Media Library
How do I handle when the record has multiple images that I want to show ?
24 replies
FFilament
Created by namrata on 12/16/2024 in #❓┊help
Spatie Media Library
I did this as well, getUploadedFileUsing() this function worked for a single url, but is not working when I have an array of these
24 replies
FFilament
Created by namrata on 12/16/2024 in #❓┊help
Spatie Media Library
great, thank you
24 replies
FFilament
Created by namrata on 12/16/2024 in #❓┊help
Spatie Media Library
24 replies
FFilament
Created by namrata on 12/16/2024 in #❓┊help
Spatie Media Library
SpatieMediaLibraryFileUpload::make('data.media')
->multiple()
->getUploadedFileUsing(static function (SpatieMediaLibraryFileUpload $component, string $file): ?array {
$user = User::find(1);

$mediaFiles = $user->getMedia('users')->map(function ($media) {
return ['url' => $media->getUrl()];
})->toArray();

return $mediaFiles;
})
->collection('images'),
SpatieMediaLibraryFileUpload::make('data.media')
->multiple()
->getUploadedFileUsing(static function (SpatieMediaLibraryFileUpload $component, string $file): ?array {
$user = User::find(1);

$mediaFiles = $user->getMedia('users')->map(function ($media) {
return ['url' => $media->getUrl()];
})->toArray();

return $mediaFiles;
})
->collection('images'),
this is where I am now, getUploadedFileUsing(), this function works but it does not take mulpitle, if there is any function which can take multiple then, my problem would be solved.
24 replies
FFilament
Created by namrata on 12/13/2024 in #❓┊help
Datepicker view changes
I tried flatpickr as well but it did not worked the way i wanted
17 replies
FFilament
Created by namrata on 12/16/2024 in #❓┊help
Spatie Media Library
Yes I will do that and share it here
24 replies
FFilament
Created by namrata on 12/13/2024 in #❓┊help
Datepicker view changes
I am using default filament's datepicker
17 replies
FFilament
Created by namrata on 12/16/2024 in #❓┊help
Spatie Media Library
I want to show the iamges for that particular product that the user has already uploaded, I checked my other projects where the image is shown in edit and it comes like this, uuid=>uuid, I did that as well, when loading the form as well, but still could not see the images. [media] => Array ( [85dd8597-7a08-489f-a0d3-f4b6261a7e85] => 85dd8597-7a08-489f-a0d3-f4b6261a7e85 [044650d8-2d06-4ffa-9e2d-8f709fa8b36d] => 044650d8-2d06-4ffa-9e2d-8f709fa8b36d [396eb7f2-aeac-4fe4-a916-3e540ea4aa15] => 396eb7f2-aeac-4fe4-a916-3e540ea4aa15 [a2b8fd36-e7bb-44f1-81b9-876ca03f1c2d] => a2b8fd36-e7bb-44f1-81b9-876ca03f1c2d ) Thank you so much, It would be great help !!
24 replies
FFilament
Created by namrata on 12/16/2024 in #❓┊help
Spatie Media Library
Yes thats what I want, to show the images that the user has already uplaoded for that particular product
24 replies
FFilament
Created by namrata on 12/16/2024 in #❓┊help
Spatie Media Library
Is there no way to make it as the edit page of any resource, how the image loads in the edit page and then we can delete that image or edit or add new. I just want to show the iamges there as it would in any edit fields
24 replies
FFilament
Created by namrata on 12/13/2024 in #❓┊help
Datepicker view changes
this is native
17 replies
FFilament
Created by namrata on 12/13/2024 in #❓┊help
Datepicker view changes
No description
17 replies
FFilament
Created by namrata on 8/11/2024 in #❓┊help
Default value in Select input
Ohh!! Thanks a lot
23 replies
FFilament
Created by namrata on 8/11/2024 in #❓┊help
Default value in Select input
this is my code, This extends settings page, which extends page
23 replies
FFilament
Created by namrata on 8/11/2024 in #❓┊help
Default value in Select input
<?php

namespace App\Filament\Pages;

use App\Settings\SiteSettings;
use Filament\Forms\Components\Section;
use Filament\Forms\Components\Select;
use Filament\Forms\Form;
use Filament\Pages\SettingsPage;

class ManageSite extends SettingsPage
{
protected static ?string $navigationIcon = 'heroicon-o-cog-6-tooth';

protected static string $settings = SiteSettings::class;

public function form(Form $form): Form
{
return $form
->schema([
Section::make(' Settings')
->schema([

Select::make('date_format')
->options([
'm/d/Y' => date('m/d/Y'),
'n/j/y' => date('n/j/y'),
'F j, Y' => date('F j, Y'),
'M j, Y' => date('M j, Y'),
])
->default('m/d/Y')
->label('Date Format'),

Select::make('time_format')
->options([
'g:i:s a' => date('g:i:s a'),
'g:i:s A' => date('g:i:s A'),
'H:i:s' => date('H:i:s'),
]),



]),
]);
}
}
<?php

namespace App\Filament\Pages;

use App\Settings\SiteSettings;
use Filament\Forms\Components\Section;
use Filament\Forms\Components\Select;
use Filament\Forms\Form;
use Filament\Pages\SettingsPage;

class ManageSite extends SettingsPage
{
protected static ?string $navigationIcon = 'heroicon-o-cog-6-tooth';

protected static string $settings = SiteSettings::class;

public function form(Form $form): Form
{
return $form
->schema([
Section::make(' Settings')
->schema([

Select::make('date_format')
->options([
'm/d/Y' => date('m/d/Y'),
'n/j/y' => date('n/j/y'),
'F j, Y' => date('F j, Y'),
'M j, Y' => date('M j, Y'),
])
->default('m/d/Y')
->label('Date Format'),

Select::make('time_format')
->options([
'g:i:s a' => date('g:i:s a'),
'g:i:s A' => date('g:i:s A'),
'H:i:s' => date('H:i:s'),
]),



]),
]);
}
}
23 replies
FFilament
Created by namrata on 8/11/2024 in #❓┊help
Default value in Select input
No description
23 replies
FFilament
Created by namrata on 8/11/2024 in #❓┊help
Default value in Select input
Could that be causing issues ?
23 replies
FFilament
Created by namrata on 8/11/2024 in #❓┊help
Default value in Select input
This ia actually not in resource but in page
23 replies