komicho / laravel-iid
Build a separate disambiguation for specific categories (IID) - Laravel
Installs: 78
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
pkg:composer/komicho/laravel-iid
This package is not auto-updated.
Last update: 2025-09-25 13:56:48 UTC
README
Build a separate disambiguation for specific categories (IID) . wikipedia
use
use Komicho\Laravel\Traits\LaravelIid;
functions
create
Model::create($data);
variables
$guideColumn
protected $guideColumn = '<column_name>';
Type the name of the column through which the group sequence is selected.
database > migrations
add column
You must add this column.
... $table->integer('iid')->nullable(); ...
Full example:-
Specify a sequence for each project.
Model :-
<?php use Komicho\Laravel\Traits\LaravelIid; class Backlog extends Model { use LaravelIid; protected $guideColumn = 'project_id'; ... }
Controller :-
<?php namespace App\Http\Controllers; use App\Backlog; use Illuminate\Http\Request; class BacklogController extends Controller { ... public function store(Request $request) { Backlog::create($request->all()); return back(); } ... }