Want to track who created or updated a record in Laravel? Try this:
protected static function booted()
{
    static::creating(function ($model) {
        $model->created_by = auth()->id();
    });
}
Want to track who created or updated a record in Laravel? Try this:
protected static function booted()
{
    static::creating(function ($model) {
        $model->created_by = auth()->id();
    });
}
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)