What are the package limitations

First of all, This package is not suitable for complicated queries, because in those cases that's better to not use ORM. There are some other limitations listes below:

1. Class and Method names

Try not to name your classes such is Filter or apply, which are reserved names. (you can change apply method name in config)

2. Chain Macro Methods

You can't chain macro methods. the example below wont work:

$users = User::active()->vip()->get();

But you can chain one macro method with filter method. rewriting above example

$users = User::active()->filter(['label' => 'vip'])->get();

3. Macro methods not working on relations

Because the macro methods are associated with Model itself, in relations, macro methods wont work and you should call these methods on model directly. Again filter method is working . Not working example is here:

$user_posts = $user->posts()->published()->get();

© 2025 elefilter