hyperlink / laravel-created-by
Annoyed by writing the created by foreign user id for every model? Use our blueprint function instead
v1.0.2
2023-01-19 12:44 UTC
Requires
- php: ^8.1
- illuminate/contracts: ^9.0
- spatie/laravel-package-tools: ^1.13.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^6.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2025-03-03 15:32:18 UTC
README
Annoyed by writing the created by foreign user id for every model? Use our blueprint function instead
Installation
You can install the package via composer:
composer require hyperlink/laravel-created-by
Usage
Schema::create('foo', function (Blueprint $table) { $table->id(); $table->createdBy(); $table->updatedBy(); $table->deletedBy(); $table->restoredBy(); $table->timestamps(); $table->softDeletes(); $table->restoredAt(); });
<?php namespace App\Models; use Hyperlink\CreatedBy\WithCreatedBy; use Illuminate\Database\Eloquent\Model; class Foo extends Model { use WithCreatedBy; use WithUpdatedBy; use WithDeletedBy; use WithRestoredBy; use WithRestoredAt; }
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.