PHP code example of tinusg / filament-company-logo-column

1. Go to this page and download the library: Download tinusg/filament-company-logo-column library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tinusg / filament-company-logo-column example snippets


'logo_dev' => [
    'publishable_key' => env('LOGO_DEV_PUBLISHABLE_KEY'),
],

use TinusG\FilamentCompanyLogoColumn\CompanyLogoColumn;

CompanyLogoColumn::make('website')
    ->tooltip(fn ($record) => $record->name)

CompanyLogoColumn::make('logo')
    ->domain(fn ($record) => $record->primary_url)
    ->tooltip(fn ($record) => $record->name)

CompanyLogoColumn::make('website')
    ->size(48)
    ->format('webp')
    ->theme('dark')
    ->fallback('monogram')
    ->lazy()
    ->tooltip(fn ($record) => $record->name)

use Filament\Tables\Table;
use TinusG\FilamentCompanyLogoColumn\CompanyLogoColumn;

public static function table(Table $table): Table
{
    return $table
        ->columns([
            CompanyLogoColumn::make('website')
                ->label('')
                ->tooltip(fn ($record) => $record->name),

            TextColumn::make('name')
                ->searchable()
                ->sortable(),

            TextColumn::make('website')
                ->url(fn ($record) => $record->website, shouldOpenInNewTab: true),
        ]);
}