Filament Table with Money, Badges and Custom Columns

Поділитися
Вставка
  • Опубліковано 31 жов 2024

КОМЕНТАРІ • 20

  • @arshaviraghajanyan3966
    @arshaviraghajanyan3966 17 днів тому +2

    Amazing example for this kind of tables!👍

  • @PabloZagni
    @PabloZagni 16 днів тому

    Great! good explanation.. very usefull! keep this way

  • @MrKeliv
    @MrKeliv 17 днів тому

    nice example Thank you

  • @mariofigueroa3395
    @mariofigueroa3395 16 днів тому

    Great work, is it possible to add sortable functionality to the Market value column?

    • @FilamentDaily
      @FilamentDaily  16 днів тому

      But does it make much sense to have sortable on a column with many different currencies? It's like comparing apples to oranges.

  • @subhan_anam
    @subhan_anam 16 днів тому

    Can we have a persistent layout (@persist) on the sidebar and topbar so they don’t flicker on page changes ?

  • @turkialharbi3585
    @turkialharbi3585 17 днів тому

    how to export single record in filament ?

    • @aminem2080
      @aminem2080 17 днів тому

      create an export action on each row ofcause, seletect row will be export once u chose that "export" action
      ExportAction::make()
      ->exporter(OrderExporter::class)
      ->formats([
      ExportFormat::Xlsx,
      ExportFormat::Csv,
      ]),
      in OrderExporter class that extends Filament\Actions\Exports\Exporter
      u need
      public static function getColumns(): array
      {
      return [
      // ExportColumn::make('id')->label('ID'),
      ExportColumn::make('Order Ref Code #'),
      ExportColumn::make('client.name')->label('Client Name'),
      // ExportColumn::make('total_cost'),
      ExportColumn::make('total_grand')->label('Order Total $'),
      ExportColumn::make('payment_method')->label('Pay Thru'),
      ExportColumn::make('payment_status')->label('Pay Status'),
      ExportColumn::make('payment_id')->label('Pay Transaction TxID'),
      ExportColumn::make('status'),
      // ExportColumn::make('info'),
      ExportColumn::make('type'),
      ExportColumn::make('created_by'),
      ExportColumn::make('created_at'),
      ExportColumn::make('updated_at'),
      ];
      }
      public static function getCompletedNotificationBody(Export $export): string
      {
      $body = 'Your order export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.';
      if ($failedRowsCount = $export->getFailedRowsCount()) {
      $body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to export.';
      }
      return $body;
      }

    • @krekas
      @krekas 17 днів тому

      create table action

  • @mohamednafil8983
    @mohamednafil8983 16 днів тому

    Hi can u create a video about product variants in filament

    • @FilamentDaily
      @FilamentDaily  16 днів тому +1

      Can you give me a deeper explanation how those product variants would work? Or any links to external projects/tutorials/forum questions with more details?
      I can't create a video from just two words description.

    • @krekas
      @krekas 15 днів тому +1

      You could check how lunarphp did it. There should be product variants

    • @nafpath
      @nafpath 10 днів тому

      @@krekas yeah right.

    • @mohamednafil8983
      @mohamednafil8983 10 днів тому

      @@krekas Yes. But I would like to see how to replicate in the filament.

    • @krekas
      @krekas 10 днів тому

      @@mohamednafil8983 check the code of lunarphp and you will see

  • @aleAmosin
    @aleAmosin 16 днів тому

    Would it be possible to have a collapse in Filament tables without losing the headers? Initially, when I started watching the video, I thought that button at the end would do that, but I was quite disappointed hahaha.

    • @FilamentDaily
      @FilamentDaily  16 днів тому

      Can you give some example of how that "collapse" should work? Any links to other projects or screenshots (non-Filament) where that works?

    • @aleAmosin
      @aleAmosin 13 днів тому

      @@FilamentDaily The Flowbite UI package has a functional example; accessing the source code requires payment, but you can get an idea from the example found on the Flowbite website, under the "Application" section, specifically in "Advanced Tables" with the "Table with expandable rows" example. I managed to do this in Filament, but the problem is that, to achieve the same behavior, I lose the column headers.

    • @aleAmosin
      @aleAmosin 13 днів тому

      @@FilamentDaily I had replied earlier, but my comment was deleted haha I think it's because I included the link.