Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

bilalbasheer's avatar

laravel filament interface

What methods would you consider essential in a PaymentGatewayInterface for Laravel Filament


namespace App\Filament\Support\Contracts;
interface PaymentGateway
{
    public function test();
}
namespace App\Filament\Support;


use App\Filament\Support\Contracts\PaymentGateway;
class Razorpay implements PaymentGateway
{

}

interface is not working and test function not generated to Razorpay class

0 likes
3 replies
tykus's avatar

test function not generated to Razorpay class

You need to implement test in the class(es) that implement the Interface; they don't come for free!?!?

1 like
bilalbasheer's avatar

@tykus The issue actually is implemment is not working correctly, when i run this class without adding test method it doesnot produce any errors and still works fine.

now i have done interfaces before but a redline comes under the class definition, that methods in interface is not implemented.

tykus's avatar

@bilalbasheer if that is your entire Interface and Class, then the test method should be enforced on the RazorPay class. If not, then show the entire RazorPay class

1 like

Please or to participate in this conversation.