These docs are for v8. Click to read the latest docs for v9.

Recount Statistics

Recount all reaction types of all model types

$ php artisan love:recount

Recount all reaction types of concrete model type

$ php artisan love:recount --model="App\Comment"

Model type could be resolved from the morph map:

$ php artisan love:recount --model="comment"

Recount concrete reaction type of concrete model type

$ php artisan love:recount --model="App\Comment" --type="Like"

Model type could be resolved from the morph map:

$ php artisan love:recount --model="comment" --type="Like"

Recount concrete reaction type of all model types

$ php artisan love:recount --type="Like"

Out of Allowed Memory

If you receive Out of Allowed Memory exception - you could run console command with turned off memory limit:

$ php -d memory_limit=-1 artisan love:recount