2017 © Pedro Peláez
 

library laravel-manageable

Track users who manages models in your Laravel app

image

signifly/laravel-manageable

Track users who manages models in your Laravel app

  • Monday, January 29, 2018
  • by signifly
  • Repository
  • 6 Watchers
  • 32 Stars
  • 908 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 4 Versions
  • 65 % Grown

The README.md

Track users who manage models in your Laravel app

Latest Version on Packagist Build Status StyleCI Quality Score Total Downloads, (*1)

The signifly/laravel-manageable package allows you to easily track who creates/updates your models., (*2)

All you have to do to get started is:, (*3)

// 1. Add required columns to your table by using our macro manageable
Schema::create('orders', function (Blueprint $table) {
    // ...
    $table->manageable();

    // params: $bigIntegers (default: true), $foreignTable (default: 'users'), $foreignKey (default: 'id')
    $table->manageable(false, 'some_users_table', 'u_id');
});

// 2. Add the Manageable trait to your model
class Order extends Model
{
    use Manageable;
}

The macro manageable adds the following to your table:, (*4)

$this->unsignedBigInteger('created_by')->nullable()->index();
$this->unsignedBigInteger('updated_by')->nullable()->index();

$this->foreign('created_by')
    ->references('id')
    ->on('users')
    ->onDelete('set null');

$this->foreign('updated_by')
    ->references('id')
    ->on('users')
    ->onDelete('set null');

Documentation

Until further documentation is provided, please have a look at the tests., (*5)

Installation

You can install the package via composer:, (*6)

composer require signifly/laravel-manageable

The package will automatically register itself., (*7)

You can publish the config with:, (*8)

php artisan vendor:publish --provider="Signifly\Manageable\ManageableServiceProvider"

Testing

composer test

Security

If you discover any security issues, please email dev@signifly.com instead of using the issue tracker., (*9)

Credits

License

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

The Versions

29/01 2018

dev-master

9999999-dev https://github.com/signifly/laravel-manageable

Track users who manages models in your Laravel app

  Sources   Download

MIT

The Requires

 

The Development Requires

by Morten Poul Jensen

29/01 2018

v1.0.2

1.0.2.0 https://github.com/signifly/laravel-manageable

Track users who manages models in your Laravel app

  Sources   Download

MIT

The Requires

 

The Development Requires

by Morten Poul Jensen

29/01 2018

v1.0.1

1.0.1.0 https://github.com/signifly/laravel-manageable

Track users who manages models in your Laravel app

  Sources   Download

MIT

The Requires

 

The Development Requires

by Morten Poul Jensen

28/01 2018

v1.0.0

1.0.0.0 https://github.com/signifly/laravel-manageable

Track users who manages models in your Laravel app

  Sources   Download

MIT

The Requires

 

The Development Requires

by Morten Poul Jensen