Bundle of Laravel helper stuff

v1.4 2019-12-30 19:07 UTC

This package is auto-updated.

Last update: 2023-01-29 03:24:25 UTC


Latest Version on Packagist Software License Quality Score StyleCI Total Downloads


You can install this package via composer:

composer require tobymaxham/laravel-helper

Model Logging

Track User changes

Track if user created, updated or deleted a Model. You have to add these attributes to you database table. By default the fields created_by, updated_by and deleted_by fields will be used.

namespace App;

use TobyMaxham\Helper\Models\Logs\ChangeByUser;
use Illuminate\Database\Eloquent\Model;

class User extends Model
    use ChangeByUser;

You could also turn off tracking by returning false to the attribute fetching methods:

public function getCreatedByColumn()
    return false;


With my MigrationHelper you can automatically add the fields to you migrations file:

     * Run the migrations.
     * @return void
    public function up()
        Schema::create('posts', function (Blueprint $table) {




Or you can create all three fields at once by calling MigrationHelper::addChangedByUserFields($table).


Please see CHANGELOG for more information what has changed recently.


The MIT License (MIT). Please see License File for more information.