Hammerstone

Build advanced filters in minutes, with the drop-in filter builder for Laravel Nova.

Finally add the advanced filtering that has lingered on your roadmap.

App screenshot
Build your filters with an expressive, readable syntax.
// This is the code that drives the UI in the screenshot above!
class CompanyFilter extends Filter
{
public function conditions()
{
return [
TextCondition::make('name', 'Name'),
BooleanCondition::make('is_subscriber', 'Subscriber'),
DateWithTimeCondition::make('created_at', 'Created At'),
OptionCondition::make('referral_source')
->options([
'twitter' => 'Twitter',
'facebook' => 'Facebook',
'linked_in' => 'LinkedIn'
]),
];
}
}

Out of the box conditions

Refine gives you a set of prebuilt conditions that covers most use cases:

  • Text — starts with, contains, ends with, equals; we do it all.
  • Date, datetime, and timestamps — don't worry, we handle the timezones.
  • Boolean — true/false columns, with optional support for nulls.
  • Numeric — greater, less, equal, between; everything you'd expect.
  • Option — pick one or more from a defined set.

All of these can be combined with and/or groupings. And if those don't meet your needs, you can add your own custom conditions!

Oh did we mention we handle querying attributes on related models?

In half an hour I added Refine from scratch and built filters for Nova which I had set aside a few days for.

Already user-proofed queries

As with everything, there are a hundred ways people can add in nonsense requests.

With Refine you can rest easy knowing that we have already caught them all.

Whether it’s mixing up the start and end date, selecting conflicting clauses, leaving out a required field, you can build your new feature knowing that Refine automatically validates every request.