thotam/thotam-plus

ThoTam additional features

0.0.2 2021-05-03 08:00 UTC

This package is auto-updated.

Last update: 2024-10-10 13:27:57 UTC


README

Latest Version on Packagist Build Status Quality Score Total Downloads

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.

Installation

You can install the package via composer:

composer require thotam/thotam-plus

Usage

Add "Thotam\ThotamPlus\Traits\ThoTamPlusTrait" to Models you want to use
For ChiNhanh add:
$table->bigInteger('chinhanh_id')->unsigned()->nullable()->default(null);
$table->foreign('chinhanh_id')->references('id')->on('chinhanhs')->onDelete('SET NULL')->onUpdate('cascade');
to table
For KenhKinhDoanh add:
$table->bigInteger('kenh_kinh_doanh_id')->unsigned()->nullable()->default(null);
$table->foreign('kenh_kinh_doanh_id')->references('id')->on('kenh_kinh_doanhs')->onDelete('SET NULL')->onUpdate('cascade');
to table
For NhomSanPham add:
$table->bigInteger('nhom_san_pham_id')->unsigned()->nullable()->default(null);
$table->foreign('nhom_san_pham_id')->references('id')->on('nhom_san_phams')->onDelete('SET NULL')->onUpdate('cascade');
to table
Add "Thotam\ThotamPlus\Traits\TinhHuyenXaTrait" to Models you want to TinhHuyenXa
For Tinh add:
$table->bigInteger('tinh_id')->unsigned()->nullable()->default(null);
$table->foreign('tinh_id')->references('id')->on('list_tinhs')->onDelete('SET NULL')->onUpdate('cascade');
to table
For Huyen add:
$table->bigInteger('huyen_id')->unsigned()->nullable()->default(null);
$table->foreign('huyen_id')->references('id')->on('list_huyens')->onDelete('SET NULL')->onUpdate('cascade');
to table
For Xa add:
$table->bigInteger('xa_id')->unsigned()->nullable()->default(null);
$table->foreign('xa_id')->references('id')->on('list_xas')->onDelete('SET NULL')->onUpdate('cascade');
to table
Add "Thotam\ThotamPlus\Traits\ChiNhanhTrait" to "Thotam\ThotamHr\Models\HR" Model

Next, you must migrate your database:

php artisan migrate

Next, you should run seed:

php artisan db:seed

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email thanhtamtqno1@gmail.com instead of using the issue tracker.

Credits

License

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

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.