deegitalbe / laravel-trustup-io-model-commons
Common functionalities for our models
v1.1.2
2023-02-12 12:28 UTC
Requires
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.5
README
Overview
This package handle uuids & softdeletes for your models.
Installation
composer require deegitalbe/laravel-trustup-io-model-commons
Configuration
Add fields to your migrations
use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; /** * Run the migrations. * * @return void */ public function up() { Schema::create('my-models', function (Blueprint $table) { $table->uuid(); $table->softDeletes(); }); }
Your models should look like this
use Deegitalbe\LaravelTrustupIoModelCommons\Models\AbstractModel; class MyModel extends AbstractModel { // ... }
You're good to go!