Laravel-activitylog: Search by properties??

Created on 23 Jun 2017  路  1Comment  路  Source: spatie/laravel-activitylog

Hi,
thanks for this super usefull package!

It麓s possible search by a extra property??
For example:

activity()->withProperties(['special_code' => 123456])->log(':causer.username modify something...');

And now, get all logs with the same code, something like:

Activity::whereProperty('special_code', 123456)-get();

Thanks again!

Most helpful comment

The extra properties are stored as json. So you could just use the Eloquent query builder for that: https://laravel.com/docs/5.4/queries#json-where-clauses

>All comments

The extra properties are stored as json. So you could just use the Eloquent query builder for that: https://laravel.com/docs/5.4/queries#json-where-clauses

Was this page helpful?
0 / 5 - 0 ratings