public static function getNextId(Model $model)
    {
        $statement = DB::select('show table status like \''.$model->getTable().'\'');

        if (!isset($statement[0]) || !isset($statement[0]->Auto_increment)) {
            throw new \Exception('Unable to retrieve next auto-increment id for this model.');
        }

        return (int) $statement[0]->Auto_increment;
    }
public static function getNextId(Model $model)
    {
        $statement = DB::select('show table status like \''.$model->getTable().'\'');

        if (!isset($statement[0]) || !isset($statement[0]->Auto_increment)) {
            throw new \Exception('Unable to retrieve next auto-increment id for this model.');
        }

        return (int) $statement[0]->Auto_increment;
    }
public static function getNextId ( Model $ model ) { $ statement = DB :: select ( 'show table status like \'' . $ model -> getTable ( ) . '\'' ) ; if ( ! isset ( $ statement [ 0 ] ) || ! isset ( $ statement [ 0 ] -> Auto_increment ) ) { throw new \ Exception ( 'Unable to retrieve next auto-increment id for this model.' ) ; } return ( int ) $ statement [ 0 ] -> Auto_increment ; }
Gets the next auto-increment id for a model

@param Model $model
@return int
@throws \Exception
Gets the next auto - increment id for a model