Skip to content

ioext/laravel_db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

LARAVEL ORM DB

Latest Stable Version
Total Downloads
License

  • 1、Install
    composer require ioext/laravel_db

  • 2、operation example

 public function test()
    {
        $arrField = ['*'];
        $arrWhere = [
            [MV3RgnChannel::CHANNEL_PID,'=',1]
        ];
        $arrOrWhere = [];
        $arrOrderBy = [
            ['sort','desc'],
            ['show_start_dt','asc']
        ];
        $nErrCode = MV3RgnChannel::getOneByWhere( $arrField,$arrWhere,$arrOrWhere,$arrRtn,$sDesc);

        $nErrCode = MV3RgnChannel::getsAll( $arrField,$arrRtn,$sDesc );

        $nErrCode = MV3RgnChannel::getsByWhere( $arrField,$arrWhere,$arrOrWhere,$arrOrderBy,'',$arrRtn,$sDesc);

        $arrWherrIn = [
            1,2,3
        ];
        $sField = MV3RgnChannel::ID;
        $nErrCode = MV3RgnChannel::getsByWhereIn( $sField,$arrField,$arrWherrIn,$arrRtn,$sDesc );

        $arrGroupByField = [
            MV3RgnChannel::CHANNEL_PID
        ];
        $nErrCode = MV3RgnChannel::getsByWhereGroupBy( $arrField,$arrWhere,$arrGroupByField,$arrRtn,$sDesc );

        var_dump($nErrCode,$arrRtn);
    }

About

laravel ORM Database encapsulation

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages