matin-utils/types-tracker

a utility for track all Types in Laravel apilcation

0.3.4 2021-11-24 05:29 UTC

This package is auto-updated.

Last update: 2025-06-17 10:11:30 UTC


README

Summery

a usefull utility for track all types in laravel/lumen application

install

usage

helper function

types()

application

app('types')

category

  • list all available categories types()->category()
[
    "nodeType",
    "licenceType",
    "travelService",
]
  • get available category types()->category('nodeType')
[
    1 => "enterprise",
    2 => "light",
]

get types

  • get Type Name by Id
types()->getName('nodeType',1)
//<return> "enterprise"
  • get Type Id by Name
types()->getId('nodeType','light')
//<return> 2