I have a custom event being triggerred by the updated Eloquent model event. This custom event is working when an update is done manually, (ie outside a Scheduled Task) but not when the update is done via a Scheduled Task
Model code
<?php namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Location extends Model {
self::updated(function ($location) {
event(new LocationRefresh($location));
});
}
Any ideas?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire