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;
    }