Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.x] Adds uses interface support #11

Merged
merged 2 commits into from
Aug 1, 2023
Merged

[1.x] Adds uses interface support #11

merged 2 commits into from
Aug 1, 2023

Conversation

nunomaduro
Copy link
Collaborator

@nunomaduro nunomaduro commented Jul 31, 2023

This pull request closes #10, and it allows to specify that the given component implements an given interface. Example:

<?php

use Filament\Tables\Concerns\InteractsWithTable;
use Filament\Tables\Contracts\HasTable;
use Filament\Tables\Table;
use function Livewire\Volt\uses;

uses([HasTable::class, InteractsWithTable::class]); ?>

$table = fn(Table $table): Table => $table
    ->query(Product::query())
    ->columns([
        TextColumn::make('name'),
    ])
    ->filters([
        // ...
    ]); ?>

<div>
    ...

@nunomaduro nunomaduro marked this pull request as draft July 31, 2023 14:51
@nunomaduro nunomaduro marked this pull request as ready for review July 31, 2023 14:51
@taylorotwell taylorotwell merged commit 3728b95 into main Aug 1, 2023
6 checks passed
@taylorotwell taylorotwell deleted the feat/interfaces branch August 1, 2023 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to implement interfaces
2 participants