วันจันทร์ที่ 17 มิถุนายน พ.ศ. 2567

วันอังคารที่ 2 มกราคม พ.ศ. 2567

laravel 5.2 paginate bootstrap5 nav not show

 nav link not work



add  javascript 

  $('.pagination li').addClass('page-item');
    $('.pagination li a').addClass('page-link');
    $('.pagination span').addClass('page-link');


วันศุกร์ที่ 10 พฤศจิกายน พ.ศ. 2566

Filament Disable Button Create Edit Delete

   
    public static function canCreate(): bool
    {
        return false;
    }
   
    public static function canEdit(Model $record): bool
    {
        return false;
    }
   
    public static function canDelete(Model $record): bool
    {
        return false;
    }
   
    public static function canDeleteAny(): bool
    {
        return false;
    }

 

วันอังคารที่ 31 ตุลาคม พ.ศ. 2566

Filament infolist view On Resource

 use Filament\Infolists\Infolist;

use Filament\Infolists\Components;

use Filament\Infolists\Components\TextEntry;


    public static function infolist(Infolist $infolist): Infolist
    {
        return $infolist
            ->schema([
              Components\Section::make()
               ->schema([
                Components\TextEntry::make('contrct_no')
               ])

            ]);
    }

Filament Modal slideOver left

 

 ->actions([
              Tables\Actions\ViewAction::make()->slideOver(),

select field first_name and last name show data concat field

 

Select::make('people_id')             
  ->searchable()
  ->getSearchResultsUsing(fn (string $search): array =>
    Peoples::select(DB::raw('CONCAT(first_name ," ", last_name) AS name'), 'id')
   ->where('first_name', 'like', "%{$search}%")->limit(50)->pluck('name', 'id')
->toArray())
  ->getOptionLabelUsing(fn ($value): ?string => Peoples::find($value)->FullName ),

วันศุกร์ที่ 13 ตุลาคม พ.ศ. 2566

Filament Image upload

 php artisan storage:link

 INFO  The [public/storage] link has been connected to [storage/app/public].


          Forms\Components\FileUpload::make('images')
                ->image()
                ->preserveFilenames()
                ->directory('customer-image')
                ->storeFileNamesIn('customers-image')
                ->imageEditor()    
                ->label('รูป') ,
                   ])